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
27 stars 13 forks source link

Fixed a lot of things, and made var rename better. #14

Closed Mp3Alt closed 1 month ago

playvoras commented 1 month ago

the fck?

Serpensin commented 1 month ago

Yeah. This pretty much looks like an attempt to get in the contributor list, just for a pissing contest.

Serpensin commented 1 month ago

Same thing here @zeusssz. Can we just close this PR?

zeusssz commented 1 month ago

Same thing here @zeusssz. Can we just close this PR?

yep. will do. the justification here was that the variables in the code would interfere with some possible variables. image
which is why he renamed the variables to this.

local decode_function = [[
local function ]] .. random_isvalidchar_name .. [[(abcdefbyte)
    return (abcdefbyte >= 48 and abcdefbyte <= 57) or (abcdefbyte >= 65 and abcdefbyte <= 90) or (abcdefbyte >= 97 and abcdefbyte <= 122)
end

local function ]] .. random_decrypt_name .. [[(code, offset)
    local abcderesult = {}
    for i = 1, #code do
        local abcdefbyte2 = code:byte(i)
        if ]] .. random_isvalidchar_name .. [[(abcdefbyte2) then
            local new_byte234
            if abcdefbyte2 >= 48 and abcdefbyte2 <= 57 then
                new_byte234 = ((abcdefbyte2 - 48 - offset + 10) % 10) + 48
            elseif abcdefbyte2 >= 65 and abcdefbyte2 <= 90 then
                new_byte234 = ((abcdefbyte2 - 65 - offset + 26) % 26) + 65
            elseif abcdefbyte2 >= 97 and abcdefbyte2 <= 122 then
                new_byte234 = ((abcdefbyte2 - 97 - offset + 26) % 26) + 97
            end
            table.insert(abcderesult, string.char(new_byte234))
        else
            table.insert(abcderesult, string.char(abcdefbyte2))
        end
    end
    return table.concat(abcderesult)
end
]]