prometheus-lua / Prometheus

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

[BUG] Can't Obfuscate operations with "+=" #157

Open Multitude1337 opened 7 months ago

Multitude1337 commented 7 months ago

Describe the bug So, the bug happens when you try to obfuscate any code using += and probably even -=.

Expected behavior Usually, you would do count += 1 and that would yield the same result as count = count + 1. But, the obfuscator errors upon such operation.

So, it would normally just add whatever you put after += to the variable and vise versa with -=.

To Reproduce Steps to reproduce the behavior:

local count = 0
while true do
wait(1)
count += 1 --Parsing Error at Position 4:5, unexpected token <Symbol> "+", expected <Symbol> "=" <-0m
print(tostring(count))
end
levno-710 commented 7 months ago

Try to add the --LuaU argument to your obfuscate command.

Zaenalos commented 7 months ago

Add "--LuaU" argument right after cli.lua, or you can edit the "presets.lua" find the "LuaVersion" and change the value into "LuaU".

mudebug77 commented 5 months ago

@levno-710 Since Lua version 5.3, & and | bitwise operators were introduced, providing more comprehensive support for bitwise operations in Lua. These operators are used for bitwise operations on integers

Will you consider supporting it?