Jump to content

POST Node JS Compile API


Mature

Recommended Posts

Hello Mature, I didn't quite understand your question, but I think you want to use the luac API, correct? Have you seen this example that is attached to the API (https://luac.multitheftauto.com/api/)?

local TO = "compiled.lua"
local FROM = "example.lua"
fetchRemote( "https://luac.multitheftauto.com/?compile=1&debug=0&obfuscate=3", function(data) fileSave(TO, data) end, fileLoad(FROM), true)

OR

function obfuscateScript(rOne, rTwo)
    if (rOne and rTwo) then
        if (isObjectInACLGroup("resource."..getResourceName(getThisResource()), aclGetGroup("Admin"))) then
            fetchRemote( "https://luac.multitheftauto.com/?compile=1&debug=0&obfuscate=3", 
                function() 
                    fileSave(rTwo, data) 
                end
            , fileLoad(rOne), true)
            print("The script has been compiled!")
        else
            print("I don't have permissions.")
        end
    end
end

 

Link to comment

Ok, sorry! Code in JS: 

const {exec} = require("child_process");
var readline = require('readline');

var leitor = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});
leitor.question("Arquivo para ser compilado: ", function(answer) {
    exec(`curl.exe -s -X POST -F compile=1 -F debug=0 -F obfuscate=3 -F luasource=@${answer} http://luac.multitheftauto.com/ > compiled.lua`, (error,data,getter) =>{
        if(error){
            console.log("error", error.message)
            return;
        }
        if(getter){
            console.log("data",data)
        }
        console.log("Arquivo compilado com sucesso!")
    })  
    leitor.close();
});

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...