prometheus-lua / Prometheus

Lua Obfuscator written in pure Lua
https://levno-710.gitbook.io/prometheus/
GNU Affero General Public License v3.0
233 stars 69 forks source link

[BUG] Error when using config file #175

Open keplerHaloxx opened 2 months ago

keplerHaloxx commented 2 months ago

When using a config file with this command lua .\Prometheus\cli.lua --LuaU --preset Medium --c config.lua Nexus.lua I get this error

C:\Lua\lua.exe: .\Prometheus\src\cli.lua:76: attempt to call a nil value (global 'loadstring')
stack traceback:
        .\Prometheus\src\cli.lua:76: in main chunk
        [C]: in function 'require'
        .\Prometheus\cli.lua:12: in main chunk
        [C]: in ?

However when I remove the config file lua .\Prometheus\cli.lua --LuaU --preset Medium Nexus.lua It works perfectly fine. The file does exist but it doesn't load it.

Zaenalos commented 2 months ago

Don't run this in Lua5.2 as loadstring doesn't exist in 5.2+

keplerHaloxx commented 2 months ago

Don't run this in Lua5.2 as loadstring doesn't exist in 5.2+

I installed lua 5.1.5 that fixed the error. another problem happened though. This is my current code

local Players = game:GetService("Players"):GetChildren()
local RunService = game:GetService("RunService")

local Highlight = Instance.new("Highlight")
Highlight.Name = "Highlight"

for i, v: Player in pairs(Players) do
    repeat wait() until v.Character
    if not v.Character:FindFirstChild() then
        print("Test")
    end
end

and im getting this error

ROMETHEUS: Applying Obfuscation Pipeline to Nexus.lua ...
PROMETHEUS: Parsing ...
PROMETHEUS: Parsing Error at Position 7:8, unexpected token <Symbol> ":", expected <Keyword> "in"
lua51: .\Prometheus\src\logger.lua:54: Parsing Error at Position 7:8, unexpected token <Symbol> ":", expected <Keyword> "in"
stack traceback:
        [C]: in function 'error'
        .\Prometheus\src\logger.lua:54: in function 'errorCallback'
        .\Prometheus\src\logger.lua:57: in function 'error'
        .\Prometheus\src\prometheus\parser.lua:134: in function 'expect'
        .\Prometheus\src\prometheus\parser.lua:370: in function 'statement'
        .\Prometheus\src\prometheus\parser.lua:171: in function 'block'
        .\Prometheus\src\prometheus\parser.lua:149: in function 'parse'
        .\Prometheus\src\prometheus\pipeline.lua:178: in function 'apply'
        .\Prometheus\src\cli.lua:148: in main chunk
        [C]: in function 'require'
        .\Prometheus\cli.lua:12: in main chunk
        [C]: ?

im guessing it has to do with this line for i, v: Player in pairs(Players) do because of the type annotation.

Zaenalos commented 2 months ago

Don't run this in Lua5.2 as loadstring doesn't exist in 5.2+

I installed lua 5.1.5 that fixed the error. another problem happened though. This is my current code

local Players = game:GetService("Players"):GetChildren()
local RunService = game:GetService("RunService")

local Highlight = Instance.new("Highlight")
Highlight.Name = "Highlight"

for i, v: Player in pairs(Players) do
    repeat wait() until v.Character
    if not v.Character:FindFirstChild() then
        print("Test")
    end
end

and im getting this error

ROMETHEUS: Applying Obfuscation Pipeline to Nexus.lua ...
PROMETHEUS: Parsing ...
PROMETHEUS: Parsing Error at Position 7:8, unexpected token <Symbol> ":", expected <Keyword> "in"
lua51: .\Prometheus\src\logger.lua:54: Parsing Error at Position 7:8, unexpected token <Symbol> ":", expected <Keyword> "in"
stack traceback:
        [C]: in function 'error'
        .\Prometheus\src\logger.lua:54: in function 'errorCallback'
        .\Prometheus\src\logger.lua:57: in function 'error'
        .\Prometheus\src\prometheus\parser.lua:134: in function 'expect'
        .\Prometheus\src\prometheus\parser.lua:370: in function 'statement'
        .\Prometheus\src\prometheus\parser.lua:171: in function 'block'
        .\Prometheus\src\prometheus\parser.lua:149: in function 'parse'
        .\Prometheus\src\prometheus\pipeline.lua:178: in function 'apply'
        .\Prometheus\src\cli.lua:148: in main chunk
        [C]: in function 'require'
        .\Prometheus\cli.lua:12: in main chunk
        [C]: ?

im guessing it has to do with this line for i, v: Player in pairs(Players) do because of the type annotation.

Yeah, Prometheus doesn't handle the full Luau syntax.

keplerHaloxx commented 2 months ago

Yeah, Prometheus doesn't handle the full Luau syntax.

Do you know of another obfuscator that can?

Zaenalos commented 2 months ago

Yeah, Prometheus doesn't handle the full Luau syntax.

Do you know of another obfuscator that can?

Luraph

keplerHaloxx commented 2 months ago

Yeah, Prometheus doesn't handle the full Luau syntax.

Do you know of another obfuscator that can?

Luraph

Thank you! It does cost money but i guess that's just something i gotta deal with lol