Skip to content
TouseefXPublic

About

Fork of medal decompiler remitten to work like orcale original by andrew

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

187 Commits

Folders and files

Repository files navigation

Topaz

Topaz is a decompiler for LuaU bytecode built off of the codebase of Medal.

Usage

Usage: topaz.exe <COMMAND>

Commands:
  decompile  Decompile a single bytecode file, either raw or base64 encoded
  serve      Start a simple web server to handle decompiling
  help       Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Wall-clock budget is 180 seconds by default. Override with --time-budget SECS or TOPAZ_TIME_BUDGET_SECS. If the budget expires the CLI still writes whatever it has, stamps the file with TOPAZ_INCOMPLETE, converts leftover goto/::label:: to comments (Luau has no goto), and exits non-zero. TOPAZ_DEBUG_CYCLES=1 prints per-pass timings; =2 is the verbose per-round goto log.

Script

When using topaz serve, you can use the decompiler directly inside of your executor. These scripts assume you are self-hosting the decompiler. If you are using some sort of API, make sure to replace http://localhost:3000 or http://10.0.2.2:3000 with the correct API base.

Windows

getgenv().decompile = function(scriptInstance)
    local url = "http://localhost:3000/luau/decompile"
    local rawBytecode = getscriptbytecode(scriptInstance)
    
    local payload = {
        Url = url,
        Method = "POST",
        Headers = { ["Content-Type"] = "application/octet-stream" },
        Body = rawBytecode
    }

    local httpRequest = request or http_request or (syn and syn.request)
    local success, response = pcall(function() return httpRequest(payload) end)

    return response.Body
end

getgenv().syn = getgenv().syn or {}
getgenv().syn.decompile = getgenv().decompile

getgenv().Fluxus = getgenv().Fluxus or {}
getgenv().Fluxus.decompile = getgenv().decompile

getgenv().Hydra = getgenv().Hydra or {}
getgenv().Hydra.decompile = getgenv().decompile

loadstring(game:HttpGet("https://github.com/Tesker-103/DexRecontinued/releases/latest/download/out.lua"))()

print("Environments patched. Now execute Dex and try opening a script.")

Native Android

Note

  • If you're using a android, its not possible to use localhost
  • you may have to Port Forward your localhost and use that link Instand
  • i recommend ngrok or Pinggy for port forwarding

Android Emulator

Note

  • If you have a proxy enabled in WiFi settings, add 10.0.2.2 to the exceptions or disable the proxy
  • If you are using a VPN, allow LAN connections

Run the web-server on your actual machine.

If you are using an emulator, localhost will not work since that will refer to the emulator's device. Instead, we must use 10.0.2.2 instead. To test if everything is working, on your actual machine [http://localhost:3000/] should load fine, and on the emulator's browser, [http://10.0.2.2:3000/] should load. If your emulator is giving you HTTP connection fail errors, then you can try ngrok instead.

getgenv().decompile = function(scriptInstance)
    local url = "http://10.0.2.2:3000/luau/decompile"
    local rawBytecode = getscriptbytecode(scriptInstance)
    
    local payload = {
        Url = url,
        Method = "POST",
        Headers = { ["Content-Type"] = "application/octet-stream" },
        Body = rawBytecode
    }

    local httpRequest = request or http_request or (syn and syn.request)
    local success, response = pcall(function() return httpRequest(payload) end)

    return response.Body
end

getgenv().syn = getgenv().syn or {}
getgenv().syn.decompile = getgenv().decompile

getgenv().Fluxus = getgenv().Fluxus or {}
getgenv().Fluxus.decompile = getgenv().decompile

getgenv().Hydra = getgenv().Hydra or {}
getgenv().Hydra.decompile = getgenv().decompile

loadstring(game:HttpGet("https://github.com/Tesker-103/DexRecontinued/releases/latest/download/out.lua"))()

print("Environments patched. Now execute Dex and try opening a script.")

License

The original license for medal is retained, but the license for this fork has been changed to stop people from profiting from open source work for free.

Credits

All credits to the medal project goes to in honor and memory of

  • Jujhar Singh (KowalskiFX)
  • Mathias Pedersen (Customality)

Keep the Singh and Pedersen family in your guys' prayers, we love you both.

About

Fork of medal decompiler remitten to work like orcale original by andrew

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages