zeusssz / hercules-obfuscator

A powerful Lua obfuscator designed to make your Lua code nearly impossible to reverse-engineer, with multiple layers of advanced obfuscation techniques
Apache License 2.0
26 stars 13 forks source link

Issue with variable_renabler Global Functions #25

Open iwarp opened 2 days ago

iwarp commented 2 days ago

This may be more of a question, should the obfuscator be renaming the returns from the global functions when the name matches? The functions are external method that are not in this file i'm obfuscating.

Input Code

local function Create()
end

local function Test()
    GlobalFunction().Create()
    GlobalFunction().Prop:Create()
end

Output Code

local function ASCAAIqh()
end

local function XSEcXnYsJn()
    GlobalFunction().ASCAAIqh()
    GlobalFunction().Prop:ASCAAIqh()
end
zeusssz commented 2 days ago

not intended behaviour at all. it should output something akin to

local function ASCAAIqh()
end

local function XSEcXnYsJn()
    XHRFlkrK().ASCAAIqh()
    XHRFlkrK().Prop:ASCAAIqh()
end

could you send me the modules and settings you used?

iwarp commented 2 days ago

I'm just testing the variable renamer only all features others disabled. --VR

The GlobalFunction() comes from outside of my project from the product I'm scripting against. There is no require statement, I'm unable to provide the module details other than some sample code

    local seq = DataPool().Sequences[target]
    local macro = DataPool().Macros[target]
    local tc = DataPool().Timecodes[target]

    local cue = DataPool().Sequences:Insert(3)

Ideally if the method isn't found in the file it should skip the rename?

zeusssz commented 2 days ago

indeed it should. looking into it