Code Monkey home page Code Monkey logo

prometheus's Introduction

🔥 Prometheus

Test

Description

Prometheus is a Lua obfuscator written in pure Lua.

This Project was inspired by the amazing javascript-obfuscator.
It can currently obfuscate Lua51 and Roblox's LuaU, however LuaU support is not finished yet.

You can find the full Documentation including a getting started guide here.

Prometheus has an official Discord server.

Installation

To install Prometheus, simply clone the Github Repository using:

git clone https://github.com/levno-710/Prometheus.git

Alternatively you can download the Sources here.

Prometheus also Requires LuaJIT or Lua51 in order to work. The Lua51 binaries can be downloaded here.

Usage

To quickly obfuscate a script:

lua ./cli.lua --preset Medium ./your_file.lua

When using the windows release:

prometheus.exe --preset Medium ./your_file.lua

For more advanced use cases see the Documentation.

Tests

To perform the Prometheus Tests, just run

lua ./tests.lua

Building

Prometheus can currently only build on Windows. It requires srlua.exe and glue.exe inside of the root directory. If lua51 was linked dynamically, lua51.dll must also be present. Then Prometheus for Windows can be built using

build.bat

This creates a folder named build, that contains prometheus.exe as well as everything that is needed in order to run Prometheus.
Then

prometheus.exe [options]

can be used instead of

lua ./cli.lua [options]

Credits

Contributors

License

This Project is Licensed under the GNU Affero General Public License v3.0. For more details, please refer to LICENSE.

prometheus's People

Contributors

9382 avatar aws0mee avatar britzl avatar brohammer5 avatar ccuser44 avatar knicknacc avatar levno-710 avatar nougatbitz avatar oxince avatar pnlmon avatar robbie-wittenhagen avatar spinnyspiwal avatar zqnxz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prometheus's Issues

[BUG] type(nil) is seemingly broken when obfuscating

Describe the bug
As mentioned in #44, I finally tracked down the issue I was having with one of my script functions breaking as soon as Vmify, ProxifyLocals or both are used. Seems the issue is that type(nil) currently produces an error when used. So if you, for example, try to get the type of a table member that is nil, you get a non working script.

Expected behavior
type(nil) should be properly implemented when obfuscating.

To Reproduce
Adding a simple local nilType = type(nil) seems to break the function of my script immediately as soon as obfuscation options are used.

Additional context
Lua 5.1

is there a way to make the script less laggy?

as in the title of the script that is generated from Prometheus, it really lags. I tried all the Minify - Strong presets but the program I execute always force close. is there a way to make the script produced by prometheus not too lag?

[BUG] How to install on Windows?

Describe the bug
I did everything in your tutorial and installing process and it wouldn't run

Expected behavior
The obfuscated script to run but it didn't happen

To Reproduce

  1. I entered the following code: lua .\cli.lua --preset Strong ./main.lua
  2. Gave me this error: stdin:1: '<name>' expected near '/'

Additional context

[BUG] Random table keys can conflict with Lua keywords

Describe the bug
I've seen a few situations where the random two-character table key will result in "do", "or", "if", "in". - which of course causes an error. The chance of this happening goes up as the input gets larger.

Expected behavior
Generated code should be valid Lua

To Reproduce
Have poor luck I guess?

Screenshots
image

Minifier mishandles empty key table access

Describe the bug
I currently can not use Prometheus at all since even the Minify step produces compile time errors. This is because the game engine I'm writing lua for, has the notable quirk of storing a lot of userdata objects in tables with a 0 length key which I need to access.

This will look like this for an engine call:
CppCall(QDScript.GC_MESH[""] , "SetVisible" , true , targetObject)

Prometheus will turn this line into:
CppCall(QDScript.GC_MESH. , "SetVisible" , true , X)

GC_MESH. obviously is not a valid access anymore, while GC_MESH[""] is.

Expected behavior
I guess that the Minifier handles this scenario and leave the access as is.


Help is very appreciated. Thanks for providing an open source obfuscator!

[BUG] Parsing error when there is no leading 0 before the decimal point

Thanks for all your hard work on this, very promising.

Unfortunately I see a parsing error when there is no leading 0 before the decimal point, so:

local val = .5

results in output:

←[0m←[31mPROMETHEUS: Parsing Error at Position 1:12, Unexpected Token ".". Expected a Expression!←[0m

whereas this generates without issue:

local val = 0.5

I have seen a similar situation in other minifiers/obfuscators where the absence of a number after the decimal point prevents generation (not the case here).

  • Lua version: lua-5.1.5 Win64
  • Command line: lua5.1.exe cli.lua --preset Medium test.lua
  • Tested with various presets

[BUG] Anti Beautifier

Describe the bug
You can still beautify the obfuscated codes when using other language beautifiers

Expected behavior
You shouldn't be able to Beautify code.

To Reproduce

  1. Make obfuscated code with any preset
  2. Go to. https://beautifier.io/

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

[BUG] Function returns table instead of function after obfuscation

Describe the bug
I'm having an issue where the obfuscated code returns a different value than the non obfuscated code does. This obviously causes lua errors. This is all being ran and tested in the Garry's mod lua environment which is Lua 5.1 luajit. Using prometheus Alpha v0.1.8 (latest tag at this moment). Issue also exists in other lua enviroments such as https://replit.com/languages/lua.

Expected behavior

local wrappedFunctions = {}
local function registerWrap( global, wrapFunc )
    local debugtbl = debug.getinfo( global )
    local function wrap( ... )
        return wrapFunc( ... )
    end

    wrappedFunctions[wrap] = {
        debugtbl = debugtbl
    }

    return wrap
end
print( 0 )
_type = _typet or type
print( 1 )
type = registerWrap( type, function( ... ) return _type( ... ) end )
print( 2 )
print( type )
print( type( "Test1" ), type( true ) )
print( 3 )

Would normally return

0
1
2
function: 0x1531f30
string  boolean
3

To Reproduce

  1. Obfuscate code above using Vm
  2. Run code

Obfuscated code returns in repl:

0
1
2
table: 0x8d3ab0
lua: [string "<eval>"]:1: attempt to call field '?' (a table value)
stack traceback:
    [string "<eval>"]:1: in function 'i'
    [string "<eval>"]:1: in function <[string "<eval>"]:1>
    (tail call): ?
    (tail call): ?
    (tail call): ?

Additional context
The issue does NOT occur when the code is as following and obfuscated.

local function registerWrap( global, wrapFunc )
    local debugtbl = debug.getinfo( global )
    local function wrap( ... )
        return wrapFunc( ... )
    end

    return wrap
end
print( 0 )
_type = _type or type
print( 1 )
type = registerWrap( type, function( ... ) return _type( ... ) end )
print( 2 )
print( type )
print( type( "Test1" ), type( true ) )
print( 3 )

Youtube Video Tutorial?

I'm new to this kind of stuff, and would like to obfuscate my script, I hardly understand it. Will there be a youtube tutorial?

Thanks.

[BUG] Indexed Function Declarations change root variable

Describe the bug
Table changes to function after sub-table gets changed.

Expected behavior
Expected output:

583
table: 0x2407480
644
table: 0x2407480

Obfuscated code returns instead:

583
table: 0x1fe18f0
644
function: 0x1fe1e60

To Reproduce
Steps to reproduce the behavior:
Run below code through the obfuscator on Weak

local test = { func = function() return "test" end }

print( 583 )
print( test )

local function tempFunction( val )
    print( val )
end

function test.func( val )
    print( 98 )
    return tempFunction( val )
end

print( 644 )
print( test )

Obfuscated code:

--[[
    Obfuscated using Prometheus Alpha v0.2 by levno-710
]]
return(function(...)local c={"uXF5rjS=";"ejmQdM==";"CzUFv6M/CGmCm6g1UBbmCH==","vGGJqzqiYWqwSmypwM==";"nz4jdM==";"mGZtys6zqJ5kYC9CYv2=";"qVKMdVy3","fCgbuW5NEWshmXy2Y/==";"nz45r+UgYH==";"nz4ZeV7=";"r+4cuGziqsg9EzqofXH="}local function W(W)return c[W+46040]end for W,Z in ipairs({{1;11};{1,1},{2,11}})do while Z[1]<Z[2]do c[Z[1]],c[Z[2]],Z[1],Z[2]=c[Z[2]],c[Z[1]],Z[1]+1,Z[2]-1 end end do local W=table.concat local Z=string.sub local H=string.len local m=type local b=table.insert local Q=math.floor local h=string.char local L={A=62;q=29;P=59,Z=44;W=36;C=20;k=55;y=13,n=23,["3"]=43;G=52,["7"]=56;["1"]=14;u=28,t=51,S=16,O=49;X=7,l=47,J=54,g=37,D=35;["9"]=33;["+"]=38;v=19,N=34;c=10;["8"]=40;z=53,f=18;R=2;d=24,Y=30;w=12,["/"]=32;B=50;p=15;a=63;M=48;["5"]=41,r=27;E=26,x=60;b=1;["4"]=61;["0"]=31,s=5;K=57,i=3,j=39,H=0,["2"]=8;h=42;o=11;T=58;Q=46;["6"]=4;L=45;V=22;F=9,e=25;U=17,I=6;m=21}local R=c for c=1,#R,1 do local y=R[c]if m(y)=="string"then local m=H(y)local V={}local o=1 local w=0 local a=0 while o<=m do local c=Z(y,o,o)local W=L[c]if W then w=w+W*64^(3-a)a=a+1 if a==4 then a=0 local c=Q(w/65536)local W=Q((w%65536)/256)local Z=w%256 b(V,h(c,W,Z))w=0 end elseif c=="="then b(V,h(Q(w/65536)))if o>=m or Z(y,o+1,o+1)~="="then b(V,h(Q((w%65536)/256)))end break end o=o+1 end R[c]=W(V)end end end return(function(c,H,m,b,Q,h,L,A,p,u,w,Z,o,l,V,y,a,T,R)p,T,Z,u,w,A,o,V,R,y,a,l=function(c,W)local H=w(W)local m=function()return Z(c,{},W,H)end return m end,function(c)y[c]=y[c]-1 if y[c]==0 then y[c],R[c]=nil,nil end end,function(Z,m,b,Q)local L,a,y,o,w while Z do if Z<6100155 then if Z<3279192 then Z=W(-46036)L={Z}Z=c[W(-46035)]else L=W(-46038)Z=c[L]y=m[1]L=Z(y)y=nil L={}Z=c[W(-46033)]end else if Z<11041904 then y=m o=p(3006741,{})L=W(-46037)Z={[L]=o}w=583 L=W(-46038)o=Z Z=c[L]L=Z(w)L=W(-46038)Z=c[L]a=644 w=V()L=Z(o)Z=u(5817469,{})R[w]=Z L=W(-46038)Z=A(11071281,{w})o=Z Z=c[L]L=Z(a)L=W(-46038)Z=c[L]L=Z(o)L={}w=T(w)Z=c[W(-46031)]o=nil else o=98 L=W(-46038)Z=c[L]y=m[1]L=Z(o)Z=R[b[1]]L={Z(y)}Z=c[W(-46039)]L={H(L)}end end end Z=#Q return H(L)end,function(c,W)local H=w(W)local m=function(m,b,Q,h)return Z(c,{m,b,Q;h},W,H)end return m end,function(c)for W=1,#c,1 do y[c[W]]=y[c[W]]+1 end if m then local Z=m(true)local H=Q(Z)H[W(-46030)],H[W(-46034)],H[W(-46029)]=c,a,function()return 3842632 end return Z else return b({},{[W(-46034)]=a;[W(-46030)]=c,[W(-46029)]=function()return 3842632 end})end end,function(c,W)local H=w(W)local m=function(m,b,Q,h,L,R)return Z(c,{m,b,Q;h;L;R},W,H)end return m end,0,function()o=1+o y[o]=1 return o end,{},{},function(c)local W,Z=1,c[1]while Z do y[Z],W=y[Z]-1,1+W if 0==y[Z]then y[Z],R[Z]=nil,nil end Z=c[W]end end,function(c,W)local H=w(W)local m=function(...)return Z(c,{...},W,H)end return m end return(l(6522748,{}))(H(L))end)(getfenv and getfenv()or _ENV,unpack or table[W(-46032)],newproxy,setmetatable,getmetatable,select,{...})end)(...)

Additional context
Tested using: https://replit.com/languages/lua

[BUG] Glua can't be parse with --LuaU

Describe the bug
←[0m←[31mPROMETHEUS: Lexing Error at Position 4:4, Unexpected char "!"!←[0m

the line is like

if(!loaded)then print("not loaded")end

Expected behavior
should parse it or replace the excepted code

To Reproduce
if(!loaded)then print("not loaded")end
prometheus.exe --LuaU --preset Medium
(dowload from alpha lastest

If your problem is a non-working obfuscated file, please also include a minimal source code example, your config file as well as the output file that you got.

all is default value

Screenshots
image

[BUG] File Size (Parsing Errors)

Describe the bug
When uploading a 2mb file I got stuck on the Parsing Screen.

Expected behavior
To obfuscate the file.

To Reproduce
Upload a file 2mb in size.

Screenshots
image

Additional context
Nope, just wish it worked with medium sized files.

[BUG] VM bytecode logical error

Describe the bug
as the title says

Expected behavior
returns a wrong value

To Reproduce

local a, b = "aaa", "aaa"
local c = a == b == true
print(c)

using vmify

Additional context
it is supposed to print "true", but it returns "false"

minify unnecessary stuff

can you remove the unnecessary stuff in the minify like extra parentheses and extra ; it would make minifying much more easier for me

[BUG] ... function arguments only returning the first argument?

Describe the bug
I use a function to auto wrap certain functions and do some stuff to them, however after obfuscation I noticed after obfuscation they only returned the first argument. tested in https://replit.com/languages/lua

Expected behavior
Unobfuscated output:

test1   test2   test3

Obfuscated output:

test1   nil nil

To Reproduce

local function wrap( global, wrapFunc )
    local function tempWrap( ... )
        return wrapFunc( ... )
    end
    return tempWrap, global
end

local function testPrint( x, y, z )
    print( x, y, z )
end
local testPrint_ = testPrint

local function testPrintWrap( x, y, z )
    testPrint_( x, y, z )
end

testPrint = wrap( testPrint, testPrintWrap )
testPrint( "test1", "test2", "test3" )
--[[
    Obfuscated using Prometheus Alpha v0.2 by levno-710
]]
return(function(...)local a={"SFuQH0Y=";"H43T";"StDx9Rz0";"LbIzRbULrUNzDlQG","HPE=";"a3huq/j=","SA3CHR3Cv2DnvbIU","aGDzSCaENta4oGmadK==";"L3uFaj6CrbQLYl+ToUG=";"Sb3mHtNU";"";"SbkTN4pm","JFkWRdU3H4Ot9da2","v0UCNY==";"3Ru39Clw9jzC3Czc";"D4k8LK==";"+Rz6vRa8","vAnnSK==","HRkC9y==";"vdaANCmC+Cnuv0clvtE=";"+4pZ+FuQHbS=","NbIfHtE=";"HPG=";"2lpmN2Dn+4kMH4j=","vjaURdwAYbQk+jmL","+bUa32N7Dtn5DA3L3be=","H235YRzX+4X=";"N2uxHtE=","+4pT+RlMN2E=","NAln+4ae","RUwIRbnY9PNQ+bUGNy==";"2lpQHbDUoy==","al+0RjLIodaYJRlO","FWS/X/v=","2lpXNRO=","rYHcCAy=","jROtvAnBRUUdLbaADK==","vApTvAkC","JMKUNWeQJK==","9w3eoRwA+RvA9Rla";"NtalvK==";"S4anH46=","LlNiL4NxNFkeDFUNRy==";"JK==";"obm3+RpvDZUVjBwA90K=";"RdceD4kY+wnEjCj=","HG3BNAIrjRkD3wzWvjnG";"2lp0v6==","Sd3kSCkZoU3J9kDTNGS=","+4kMH4j=","34kmS43xEGDU+43B+43wEY=="}for M,Y in ipairs({{278542-278541;-442396+(644038+((-880438+1231210)+-552363))},{(-777751+1100871)+-323119,309176-309144};{559387-((409902-(-53113))-(-96339)),(212467-(-668534))-(-443349+(1639501-315202))}})do while Y[-528893-(-528894)]<Y[-838348+(379929+(-243902+702323))]do a[Y[-11957+11958]],a[Y[-770764-(-142714+-628052)]],Y[-398986-(-398987)],Y[732103-732101]=a[Y[-693297+693299]],a[Y[332465-332464]],Y[626845-626844]+((220829-962805)-(-741977)),Y[-641443-(-641445)]-((-518287-(-169122))-(-349166))end end local function M(M)return a[M-(649148-622500)]end do local M=math.floor local Y=table.concat local J=a local x={M=-163175-(-163209);D=-408713+(-482321-(-891051));f=455586+-455539;C=654479+-654427,["9"]=((427590-66541)+(736494-(396301-(-639569))))+-61647;z=-908807-(-908864);j=-831855+831875,F=508789-508782;m=103262+-103217;k=373152-373147,J=-99616-(-99630);["4"]=(58916+787958)+-846868;T=-367552+((434937-(-92874))-160213),r=(-393786+230909)-(-1102576-(-939681));A=643238-643184;N=594212-594187;V=(-638050-(-809956))+-171891,Y=983046-983030,p=(538710-(-496899))-1035548;Q=470589+-470548;h=((140816-200583)-513288)+573066,E=(-459053+-299612)+758673;Z=-388712+388763,R=(734271-115447)+-618802,["/"]=780140+-780081;["5"]=-12720-(((1041105+-245937)+-844149)+36219);G=-148378+148382;K=-849938+((-598216-253763)+1701949),P=(771572-580967)+-190602;L=-959070-(-959082);["+"]=102524+(((-660053-357412)-((-857397-213633)-(-171147+-473519)))-(-488606));["2"]=830229-830206,b=-687714+687752,u=978463+-978454;["7"]=-259480+259490;I=800644-800595;["3"]=159021+-159000;q=854395+-854335;X=231932+(498395+(-493833-236450));["1"]=-988949-(61403+(-506696+-543719)),d=-266928+266947,O=623745+-623689;["6"]=-236916+236964;n=398772-398739;U=-546223-(-546260),g=(522245+15702)+(-1401569-(-863684));["8"]=-171436+171479;c=(-222934-294421)-(-517356),v=-19739-(-457537+(-647713+1085487)),S=289794+-289766;i=-962998-(-963056),l=712691-712638,t=12490+-12435;W=-284967-(618574+-903543);w=575691+-575655;e=(279165-882371)+603246;H=1020581-1020554,x=768217-(147228-(-620939)),o=188773+-188743;y=-298293-(217191-515484);s=(-146300-(-1025575))+-879244;["0"]=682250+-682211,B=-422779+422814,a=528318+-528305}local S=string.len local Z=string.char local r=table.insert local X=string.sub local j=type for a=465047-465046,#J,1048522-(1882495-833974)do local A=J[a]if j(A)=="string"then local j=S(A)local n={}local d=-440470-((747729+-1418682)+230482)local u=717448-(120194-(-1134279-(-537025)))local R=-293440-(-293440)while d<=j do local a=X(A,d,d)local Y=x[a]if Y then u=u+Y*(-771660+771724)^((-596165+596168)-R)R=R+((88982+(235457+-390703))+66265)if R==73435-73431 then R=634228-634228 local a=M(u/((-24316-(-574297))+-484445))local Y=M((u%(-633395-(-698931)))/(804141+-803885))local J=u%(-436619-(-436875))r(n,Z(a,Y,J))u=-307708+307708 end elseif a=="="then r(n,Z(M(u/((27640+86332)-48436))))if d>=j or X(A,d+(806129-806128),d+(1031357-(563262-(-260731-207363))))~="="then r(n,Z(M((u%(-817924+883460))/((-309175-(-958143-(-632098)))+-16614))))end break end d=d+(-342398+(667943-325544))end J[a]=Y(n)end end end return(function(a,J,x,S,Z,r,X,R,A,n,k,y,u,Y,j,F,t,H,v,q,K,d,s)n,F,R,K,Y,v,j,d,t,y,H,u,k,A,q,s=function()d=d+(-884209-(-884210))A[d]=308845+-308844 return d end,function(a,M)local J=u(M)local x=function(x,S)return Y(a,{x,S},M,J)end return x end,function(a)local M,Y=890824+(-555933-(886471+(543284+-1094865))),a[827576+-827575]while Y do A[Y],M=A[Y]-(-701458-(-701459)),(375127-375126)+M if A[Y]==-226758+226758 then A[Y],j[Y]=nil,nil end Y=a[M]end end,function(a,M)local J=u(M)local x=function(...)return Y(a,{...},M,J)end return x end,function(Y,x,S,Z)local E,O,X,I,U,C,R,G,z,L,W,w,h,b,B,N,d,A,Q,V,g,p,P,l,u,c,T,i,f,m,o,a2,D,e while Y do if Y<-407219+8326250 then if Y<690010+4036530 then if Y<100062+2590317 then if Y<(-1293395-(-730358))+2171440 then if Y<497454+145322 then if Y<1015815+-656932 then if Y<893536-689053 then A=M(-853693+880350)u=(-21058+741062)+-720004 Y=a[A]d=j[S[-387641+387649]]A=Y(d,u)Y=179412+(-45095+2461877)else A=x w=M(410119-383448)d=n()u=M(((126063-314154)+(-374980+695869))+-106115)Y=true j[d]=Y R=n()X=a[u]u=M(145290-118631)Y=X[u]u=n()j[u]=Y Y=s(4222565-(-497715),{})j[R]=Y W=n()Y=false j[W]=Y L=a[w]C=k(4230655-(-117011),{W})w=L(C)X=w Y=w and(500815-1022986)+5249953 or-59202+12897091 end else Y=true Y=Y and 146847+15808452 or 1127322-(-111630-471314)end else if Y<-171480+(570411+837190)then u=-207096+(-556904-(-764247))Y=-244999+13911321 d=j[S[-269921-(-269924)]]A=d*u d=(425005+-201034)+-223714 X=A%d j[S[(-843343+(192954+119198))+531194]]=X else A=j[S[(729945+248974)-978918]]X=#A A=-521963-(-521963)Y=X==A Y=Y and 16797742-324093 or((10112831-175981)-(-240588))-233002 end end else if Y<2128060-(-344172)then if Y<2753535-401289 then if Y<-140768+1858347 then X={}Y=a[M(65501+((((-321761+(-870175+3089700))-595160)-961981)-379470))]else Y=a[M(559995-(-591465+1124771))]X={d}end else Y=12247801-((-142256-479638)+559210)d=j[S[254965-254963]]u=j[S[-952038-(-952041)]]A=d==u X=A end else if Y<-500884+(3274972-181611)then Y=-493830+890304 else Y={}d=489646+-489645 u=j[S[635804+-635795]]A=Y R=u u=14449+-14448 W=u u=-156244-(-156244)Y=9638049-(-57941)L=W<u u=d-W end end end else if Y<3270451-(-606474)then if Y<3406078-(227523-422432)then if Y<2647559-(-696822)then if Y<2436833-(-95798-380759)then Y=G Y=e and 14339027-(1021924+-1538983)or-717601+7829571 X=e else R=M(-913185+939835)X=M(810763-(890713-106608))Y=a[X]A=j[S[-971634-(-971638)]]e=s(15735346-399520,{})C=M(474121-447450)u=a[R]w=a[C]C={w(e)}w=-26766-((601642+-1282217)+653807)L={J(C)}W=L[w]R=u(W)u=M(-549498+576166)d=A(R,u)A=d()X=Y(A)A=X d=j[S[765427-765422]]Y=d and 14940866-(-456054)or 10113782-(-988998+(1954865-683110))X=d end else d=u Y=j[S[-623097+623098]]C=((-24970+-913181)+1939036)+-1000885 e=852101-851846 w=Y(C,e)A[d]=w Y=10372393-676403 d=nil end else if Y<-89034+3757348 then Y=j[S[(-12196-(-825444))+-813238]]d=j[S[189364-(1140834-951481)]]A[Y]=d Y=j[S[282839-282827]]d={Y(A)}X={J(d)}Y=a[M(-168093-(-194762))]else d=j[S[62142+-62139]]u=-565628-(-565660)A=d%u o=766265-766252 R=j[S[-774976+774980]]w=j[S[(575968-948020)+372054]]c=j[S[13953+-13950]]e=-180043+180045 B=c-A c=412724+-412692 z=B/c G=o-z C=e^G L=w/C W=R(L)R=4295361018-393722 C=-927072-(790765+-1717838)u=W%R e=(278966-(-147568))-426278 W=-704220+704222 R=W^A d=u/R R=j[S[279354-(561620-(-692235+974505))]]w=d%C C=86493+4294880803 L=w*C w=((506282+(-986765+1259329))+-834214)+120904 W=R(L)R=j[S[751339+-751335]]L=R(d)u=W+L W=285200+-219664 Y=9841125-(-103311)d=nil R=u%W L=u-R W=L/w w=376264-376008 L=R%w o=60667-60411 C=R-L A=nil w=C/e e=-128679-(-128935)C=W%e R=nil G=W-C e=G/o u=nil W=nil G={L;w,C,e}L=nil j[S[754577-754576]]=G w=nil e=nil C=nil end end else if Y<-599325+(859393+4084862)then if Y<992581+(211558+2871511)then U=n()b=M(-701415+728114)j[U]=i X=a[b]O=M(((244652+589523)+(((1491466-905497)-(-358312))+-1544484))-207322)P=-398282-(-408282)b=M(-707770-(-734462))Y=X[b]D=((414551+-964961)+247849)+302661 b=426574+-426573 X=Y(b,D)D=-611254+611254 b=n()j[b]=X I=31252-30997 Y=j[w]X=Y(D,I)D=n()j[D]=X I=865077-865076 Y=j[w]g=j[b]f=561906-561904 X=Y(I,g)V=(1006131+-1186493)+180363 I=n()j[I]=X X=j[w]g=X(V,f)f=M((-1079151-(-808614))-(973048+-1270258))X=-259912+259913 Y=g==X g=n()Q=-921930+921930 j[g]=Y p=a[O]X=M(-1019980+1046648)m=j[w]T=m(Q,P)Y=M(223122+(-1210844-(-1014392)))O=p(T)p=M(-626093-(-652766))Y=c[Y]a2=O..p V=f..a2 f=M(819678-(1231248-438241))Y=Y(c,X,V)V=n()j[V]=Y X=a[f]a2=F((-397903-(-57870))+14335586,{w;U,G;u;d,E,g,V;b,I,D,e})f={X(a2)}Y={J(f)}f=Y Y=j[g]Y=Y and-498780+6246790 or-166483+7596958 else A={r(754325+(((-506117-(-522569))+-863241)-(-92465)),J(x))}Y=j[S[698045-698044]]d=A[103928-103927]X={Y(d)}Y=a[M(-589067-(-615751))]X={J(X)}end else if Y<4907124-344969 then Y=true j[S[39509-39508]]=Y Y=a[M(-146078+(-741193-(-913964)))]X={}else A=M(1038075+-1011395)X=M(-814963-(-841620))Y=a[X]X=Y(A)X={}Y=a[M(303371+-276699)]end end end end else if Y<(-584143+7206139)-(397535-105286)then if Y<160960+5188278 then if Y<-521167+5523287 then if Y<4855614-(-257785+((231207-517433)-((277902+-595417)+-229897)))then if Y<656078+4158483 then L=j[W]Y=806494+12031395 X=L else E=E+U D=not b c=E<=h c=D and c D=E>=h D=b and D c=D or c D=(-919424+935884)+(14167135-(-354615))Y=c and D c=598802+10939091 Y=Y or c end else Y=a[M(-109185+135873)]c={}f=M(-521466+548119)w=nil b=M((-692806-213104)-((-95483-528902)+-308212))E=n()C=nil h=F((593213-707081)+1505836,{E;e,G;W})W=t(W)j[E]=c c=n()j[c]=h R=nil U=n()g=M(266500-239839)R=H(960050+6778899,{})W=y((354146-234663)+(48533+12920469),{})L=nil D={}L=n()B=nil h={}j[U]=h X={}O=nil h=a[b]V=j[U]I={[g]=V;[f]=O}b=h(D,I)o=nil h=F((14401547-977288)-(-1016170),{U,E,z,e,G;c})E=t(E)w=s(6386023-701945,{L})e=t(e)u=b E=403368+5855206609847 U=t(U)j[L]=W C=R(W,w)c=t(c)R=nil G=t(G)W=C w=nil d=h z=t(z)z=M((-1862031-(-837241))+1051476)B=188182+31387535493669 o=d(z,B)B=M(247871-221206)G=u[o]c=-410764+17184330865669 z=d(B,c)o=u[z]L=t(L)c=M(674767+-648104)B=d(c,E)z=u[B]u=nil e=W(G,o,z)W=nil d=nil end else if Y<-251640+5529426 then E=#B h=551846-551846 c=E==h Y=c and(192392+-428787)+5228738 or-470526+12435450 else l=j[d]Y=l and 14853235-444034 or 8479115-716849 i=l end end else if Y<(974451+5583366)-758872 then if Y<5518096-(-203343)then if Y<(610372+-1562985)+6513487 then G=G+o B=not z C=G<=e C=B and C B=G>=e B=z and B C=B or C B=490854+8105844 Y=C and B C=8336122-(-692454)Y=Y or C else u=x[((-472124-84116)-(-315044))-(-241199)]A=x[(38241-374825)-(-336585)]Y=j[S[406905+-406904]]d=x[(-206638+-332154)+538794]X=Y(A,d,u)X={}u=nil A=nil Y=a[M(618142-591476)]d=nil end else a2=j[d]X=a2 Y=a2 and 6364083-(541098+-929397)or 172754+6423892 end else if Y<6047500-21966 then g=t(g)V=t(V)D=t(D)U=t(U)I=t(I)f=nil Y=794758+7481802 b=t(b)else Y=v(221452+2327248,{R})l={Y()}Y=a[M(864862+-838207)]X={J(l)}end end end else if Y<410099+(6671219-(-284243))then if Y<5784529-(-834088)then if Y<-480093+7018956 then if Y<-277118+6756141 then Y=true Y=Y and 14424820-(866286+-131994)or(-630693+(311733+14339355))-329325 else Y=true Y=Y and-990423+8475795 or 686053+5508700 end else j[d]=X Y=5374430-(1039658+-1479342)end else if Y<7267860-336864 then T=-1033444+1033445 p=Y m=f[T]T=false O=m==T Y=O and-133103+13028851 or(-814084+(561517+11721426))-(-114120+(-3542+(-1242841-(-680466))))a2=O else G=M((532927-231680)+-274550)Y=14869708-13622 e=a[G]X=e end end else if Y<26335+7600308 then if Y<6952178-(-482399)then p=j[d]a2=p Y=p and 10385057-(-1015958)or 8895870-(-746134)else Y=6897043-(304075-(-125684))end else if Y<-89708+7829715 then A=x[-341435+341436]d=n()j[d]=x[-40004+40006]Y=K(114929+(4524538-560876),{d})u=Y Y=a[M((((14547+328161)-(-990614))-(-704844+1461456))-550050)]X={u,A}else j[d]=i Y=j[d]Y=Y and 9123962-(-1040896+(-619146+1141979))or 14604189-(-340311)end end end end end else if Y<18445+12673685 then if Y<11291248-881352 then if Y<10516779-(265137+(575337-(-4877)))then if Y<8616621-(-485706)then if Y<8416015-(-416381)then if Y<-784075+9245403 then U=not h i=i+N X=i<=l X=U and X U=i>=l U=h and U X=U or X U=-415802+4456255 Y=X and U X=6277125-929073 Y=Y or X else C=G N=M(390542-(233530+130329))l=a[N]N=M(-428613-(-92086-363221))i=l[N]l=i(A,C)i=j[S[((127563-486751)+((-432708+1372471)+-1194559))+613990]]N=i()E=l+N c=E+L E=733370+-733114 Y=761467+4632502 N=(-97653-(-526092))-428438 B=c%E E=u[d]L=B l=L+N i=R[l]c=E..i u[d]=c C=nil end else L=nil R=nil w=nil Y=2246055-(-93881)end else if Y<(-408010+(247652+642735))+9159646 then j[d]=a2 Q=((-9420-(855854+-1269075))+-1260626)+856826 T=j[I]m=T+Q O=f[m]p=o+O O=((-228604-330447)-(-993342))+(-940908-(-506873))Y=p%O m=j[D]O=z+m o=Y m=-358629+358885 p=O%m z=p Y=-473320+6287434 else Y=(-247670-(-130452))+((30327-938553)+17068494)end end else if Y<11060552-1002681 then if Y<(((-438914+(22557-232903))+(-43902-(752279-(-138641))))-(-545220))+((11818130-(((779741+1387655)-520044)-712338))-(-26728))then if Y<(-248745-755170)+10704780 then w=not L u=u+W d=u<=R d=w and d w=u>=R w=L and w d=w or d w=755079+2837969 Y=d and w d=565646+3047457 Y=Y or d else j[S[(394016-(-143631))-537642]]=X A=nil Y=(-1005626+11344007)-(-982439)end else u=M(1001947-975268)d=a[u]u=M(-599460-(-626150))Y=a[M(-695941-(-722636))]A=d[u]u=j[S[900349+-900348]]d={A(u)}X={J(d)}end else if Y<(-289235-(575773+-177987))+10943611 then u=(228000+(-845343+12300658))-(-68627)d=M(725644+-698948)A=d^u X=-867782+6956632 Y=X-A A=Y X=M(-368559-(-395215))Y=X/A X={Y}Y=a[M(((1943110-813731)-248251)-(800798+53681))]else N=M(67411+(-854528-(((-528388-(-967980))+-511630)+(377519+-1119248))))Y=a[N]U=M(33492+(-311968-(-305128)))h=a[U]N=Y(h)Y=M(586842+(20494+-580651))a[Y]=N Y=13170110-485950 end end end else if Y<12629939-682437 then if Y<370696+11109330 then if Y<10513649-(-876539)then if Y<(11654906-(((540780+-245784)-(-400309))+155360))-(-509775)then Y=2799933-459997 else Y=j[S[-221461-(-221468)]]Y=Y and(222365-727519)+623883 or 1023373+(556293-(-1713174-(-696646)))end else O=(1868560-1028273)-840286 Y=10681443-1039439 p=f[O]a2=p end else if Y<808843+(10421409-(-328108))then h=421542-421542 E=#B c=E==h Y=(637495+-1611410)+12938839 else B=M(-11444-(-38123))z=a[B]B=M((423229-980440)-(-583908))o=z[B]e=o Y=2431579-(-314443)end end else if Y<69642+12124724 then if Y<13041217-(-126905+(-270123+1333134))then h=#B E=360846-360845 Y=899576+4106491 c=R(E,h)E=L(B,c)h=j[z]D=285056-285055 b=E-D U=w(b)h[E]=U E=nil c=nil else Y=p X=a2 Y=-684714+7281360 end else if Y<13064083-460912 then Y=X and 2574582-(-479091-244065)or 1000295+10320525 else Y=(-773719+6449557)-(-791446)end end end end else if Y<14280659-(-299086)then if Y<-966019+(14432191-(-964037-(-739227)))then if Y<(890407+11890979)-(-851379)then if Y<-111522+13139906 then if Y<12405241-(-445409)then C=M(910253-883574)w=M(94252+(94598-162151))z=M(1027387+-1000708)L=X X=a[w]w=M(151308+-124616)Y=X[w]w=n()j[w]=Y X=a[C]C=M((-166359+-124895)+317921)Y=X[C]G=Y C=Y o=a[z]Y=o and-564901+12491880 or-833643+(4369550-789885)e=o else T=469605-469603 m=f[T]T=j[V]Y=12303965-155069 O=m==T a2=O end else A=x[7028-7027]X=M(958451-(1268225-336455))u=x[437828+-437825]d=x[211113+-211111]Y=a[X]X=Y(A,d,u)Y=a[M(343126-(559562-243098))]d=nil X={}A=nil u=nil end else if Y<14444280-(563536+208619)then d=j[S[-1014580-(-1014583)]]u=(893100+-338931)+-554168 A=d~=u Y=A and(-351193+950328)+(439465+(-466752+(-738246+4030308)))or-91476+1312050 else N=-365777+365778 Y=j[w]h=-370249+370255 l=Y(N,h)Y=M(-232916+259601)a[Y]=l h=M(-139050-(-165735))N=a[h]h=-948826-(-948828)Y=N>h Y=Y and 9556931-(-821244)or-324560+16524751 end end else if Y<13661228-(-1032643+275152)then if Y<743227+13634379 then if Y<(12145684-(880993+(((-319727-(-337361-622958))+(27710-890381))+-1500577)))-(-917921)then X={}Y=a[M(-369274+395948)]else W=(-537981-(-929629+93839))-297807 d=j[S[41388+-41387]]R=292432-292431 u=d(R,W)d=-960258-(-411569+-548690)A=u==d X=A Y=A and(67788+12917881)-675184 or 3297403-878420 end else l=o==z Y=-304264+8066530 i=l end else if Y<(((269852+-1011700)-(-1026468))-(-726667+1473151))+14943626 then d=x[-976371+976373]A=x[-666249-(-666250)]Y=j[S[575475-575474]]u=Y Y=u[d]Y=Y and 664862+10649144 or(16126655-1027910)-(-1612552-(-808850))else c=E Y=-262691+5111166 D=c B[c]=D c=nil end end end else if Y<16333416-((-44598-(-196500))+233484)then if Y<(683031+(15049589-334960))-25458 then if Y<15609158-611076 then if Y<14688444-(-886785-(-718231))then o=-973028+973093 e=n()j[e]=X G=(-1472283-(-651605))+820681 Y=j[w]X=Y(G,o)G=n()j[G]=X Y=(-895928+1338659)+-442731 o=Y Y=-363595+363595 B=M(6774-(-19897))c=q(-236163+10385568,{})z=Y X=a[B]B={X(c)}Y={J(B)}N=M((1299375-530882)-741843)X=269295-269293 B=Y Y=B[X]c=Y X=M(441817+-415159)Y=a[X]E=j[u]l=a[N]N=l(c)l=M((-420722+1270600)+-823210)i=E(N,l)E=i()X=Y(E)E=n()j[E]=X X=(-661044-(-159916))+501129 i=j[G]Y=8555595-279035 l=i i=491801+-491800 N=i i=8626+(-762656-(-754030))h=N<i i=X-N else Y=true Y=5770427-(-424326)end else u=700118+1645954 X=-381029+8326813 d=M((-445993+1251463)+-778794)A=d^u Y=X-A X=M(-271874-(-298549))A=Y Y=X/A X={Y}Y=a[M(-224033+250711)]end else if Y<15107865-(-293459)then Y=10003651-172626 u=j[S[((-959076+1892878)-204195)-729601]]d=u==A X=d else Y={}j[S[442107-442105]]=Y w=890750-890495 X=j[S[-987530+987533]]R=X W=714132+35184371374700 X=d%W C=M((815120-(-237021))-1025458)j[S[971121+(-1967470-(-996353))]]=X L=d%w w=-429838-(-429840)W=L+w Y=6065986-672017 j[S[-741436-(-741441)]]=W w=a[C]C=M(1020356+-993674)L=w[C]w=L(A)L=M(-703127-(-729818))C=-519298+519299 e=w G=568166-568165 u[d]=L L=(533649+-458807)+-74764 o=G G=-818525+818525 z=o<G G=C-o end end else if Y<16654136-463088 then if Y<(15989373-860263)-(-902255)then X=M(928469+(-139607-762177))Y=a[X]A=M(918020+-891368)X=a[A]A=M(181287-154635)a[A]=Y A=M((949653+(-1546207-(-271306)))+351933)a[A]=X A=j[S[((480540+(-488104+-390550))+238674)+159441]]d=A()Y=391057-(-5417)else Y=5542105-693630 W=t(W)e=t(e)C=nil E=t(E)w=t(w)L=nil E=(-679899-(-643039))-(-37116)B=nil G=t(G)c=nil G=n()o=nil R=t(R)d=t(d)u=t(u)h=E e=M(290723-264040)L=M(-229917+256616)d=nil u=nil c=295887-(342234-46348)z=nil o={}W=a[L]L=M((521681+-795657)+300627)B={}w=M(960861-934162)R=W[L]W=n()j[W]=R L=a[w]C=M(-484504-(-511183))w=M(-160127-(-186819))R=L[w]w=a[C]C=M(157784+-131094)L=w[C]C=a[e]e=M(((981221+-1982872)-(-1025300))-(-3049))w=C[e]e=n()C=61395+-61395 j[e]=C C=(543756-510612)-33142 z=n()j[G]=C C={}j[z]=o o=729474-729474 E=-934649-(-934650)U=E E=(((-222349-(746776-(-639206+1189777)))+(-572233+635544))+697296)-342053 b=U<E E=c-U end else if Y<16948558-710674 then h=M(365241+((((-152859+891010)+-73471)-(437618+(-803996+1218195)))+-151419))Y=a[h]h=M(-354413-(-381065))a[h]=Y Y=13601037-916877 else u=438923+-438862 d=j[S[375654-375652]]A=d*u d=(31395541253978-944771)-(-740092)X=A+d A=35184371224894-(-863938)d=984437-984436 Y=X%A j[S[-135507-(((-690065-(846772+-1676227))-(-452098))+-726997)]]=Y A=j[S[-214827+214830]]Y=5644+1214930 X=A~=d end end end end end end end Y=#Z return J(X)end,function(a,M)local J=u(M)local x=function(x,S,Z,r,X)return Y(a,{x,S;Z;r,X},M,J)end return x end,{},-597186-(-367673-229513),function(a)A[a]=A[a]-((-707486-(-80821))+626666)if 882344+(-1321079-(-598311-(-159576)))==A[a]then A[a],j[a]=nil,nil end end,function(a,M)local J=u(M)local x=function(x,S,Z,r,X,j,A,n)return Y(a,{x;S,Z;r,X;j;A,n},M,J)end return x end,function(a,M)local J=u(M)local x=function(x,S,Z,r,X,j,A)return Y(a,{x,S;Z,r,X,j,A},M,J)end return x end,function(a)for M=-913112-(-913113),#a,13252+-13251 do A[a[M]]=A[a[M]]+(-365006+(-455075-(917803+-1737885)))end if x then local Y=x(true)local J=Z(Y)J[M(902145-(-13801-(-889285)))],J[M(-421252-(-258965+-188964))],J[M(-568969+595633)]=a,R,function()return 867082-(-265189)end return Y else return S({},{[M(-808553+835230)]=R,[M(-935383-(-962044))]=a;[M(292837-266173)]=function()return 499427-(-102582-(575568-(46410-1104)))end})end end,function(a,M)local J=u(M)local x=function(x)return Y(a,{x},M,J)end return x end,{},function(a,M)local J=u(M)local x=function(x,S,Z)return Y(a,{x;S;Z},M,J)end return x end,function(a,M)local J=u(M)local x=function(x,S,Z,r)return Y(a,{x;S;Z;r},M,J)end return x end return(K(4723+323595,{}))(J(X))end)(getfenv and getfenv()or _ENV,unpack or table[M(-622062-(-648759))],newproxy,setmetatable,getmetatable,select,{...})end)(...)

[BUG]

image
When I obfuscate the script with --preset Medium the script will not work

Code of the script:

    -- library
    local repo = "https://raw.githubusercontent.com/wally-rblx/LinoriaLib/main/"
    local Library = loadstring(game:HttpGet(repo .. "Library.lua"))()
    local ThemeManager = loadstring(game:HttpGet(repo .. "addons/ThemeManager.lua"))()
    local SaveManager = loadstring(game:HttpGet(repo .. "addons/SaveManager.lua"))()
    Library:Notify("Anti-AFK loaded!")

    -- varbs
    local plr = game:GetService("Players").LocalPlayer
    local rep = game:GetService("ReplicatedStorage")
    local rebirthShop = require(rep.RebirthShopModule).rebirthShop
    local mod = require(rep.FunctionsModule)
    local wrk = game:GetService("Workspace")
    local Gamepass = plr.Data.gamepasses
    local rebMod = getsenv(plr.PlayerGui.mainUI.rebirthBackground.LocalScript)
    local rs = game:GetService("RunService")
    local vu = game:GetService("VirtualUser")
    -- anti afk
    plr.Idled:connect(function()
        vu:Button2Down(Vector2.new(0, 0), wrk.CurrentCamera.CFrame)
        wait(1)
        vu:Button2Up(Vector2.new(0, 0), wrk.CurrentCamera.CFrame)
    end)

    -- tables
    local function shopTable()
        local shopTable = {}
        for _, v in next, rebirthShop do if rawget(v, "name") then table.insert(shopTable, v.name) end end
        return shopTable
    end
    local function getEggs()
        local newEggs = {unpack(require(rep.EggModule).Order)}
        for _, v in next, wrk.Eggs:GetChildren() do
            if not tostring(v):find("Robux") and not table.find(newEggs, tostring(v)) and
                not table.find(require(rep.EggModule).Order, tostring(v)) then
                table.insert(newEggs, tostring(v))
            end
        end
        return newEggs
    end
    local function giveRebirths()
        local rebirthsTable = {1, 5, 10}
        for _, v in next, rebirthShop do
            if rawget(v, "rebirthOption") then table.insert(rebirthsTable, v.rebirthOption) end
        end
        return rebirthsTable
    end
    local function giveZones()
        local zonesTable = {}
        for i, v in next, wrk.Zones:GetChildren() do table.insert(zonesTable, v.Name) end
        return zonesTable
    end

    -- functions
    local function teleportTo(pos) plr.Character.HumanoidRootPart.CFrame = pos.CFrame + Vector3.new(0, 5, 0) end
    function Invite()
        if not isfolder('Mint') then
            makefolder('Mint')
        end
        if isfile('Mint.txt') == false then
            (syn and syn.request or http_request)({
                Url = 'http://127.0.0.1:6463/rpc?v=1',
                Method = 'POST',
                Headers = {
                    ['Content-Type'] = 'application/json',
                    ['Origin'] = 'https://discord.com'
                },
                Body = game:GetService('HttpService'):JSONEncode({
                    cmd = 'INVITE_BROWSER',
                    args = {
                        code = 'JUEu7XFBXD'
                    },
                    nonce = game:GetService('HttpService'):GenerateGUID(false)
                }),
                writefile('Mint.txt', 'discord')
            })
        end
    end

    -- ui
    local Window = Library:CreateWindow({
        Title = "Mint Hub",
        Center = true,
        AutoShow = true,
        Size=UDim2.fromOffset(570, 620),
    })
    do
        local Tabs = {
            Main = Window:AddTab("Main"),
            ["UI Settings"] = Window:AddTab("UI Settings")
        }
        local lfFarm = Tabs.Main:AddLeftTabbox("Farming")
        local tFarm = lfFarm:AddTab("Farming")
        local rtPB = Tabs.Main:AddRightTabbox("Pets & Rebirth")
        local tP = rtPB:AddTab("Pets")
        local tB = rtPB:AddTab("Rebirths")
        local rtTP = Tabs.Main:AddRightTabbox("Teleportation")
        local tTP = rtTP:AddTab("Teleportation")
        local rtPLR = Tabs.Main:AddLeftTabbox("Local Player")
        local tPLR = rtPLR:AddTab("Local Player")
        local rtMisc = Tabs.Main:AddLeftTabbox("Misc")
        local tMisc = rtMisc:AddTab("Misc.")
        local rtCredits = Tabs.Main:AddRightTabbox("Credits")
        local tCredits = rtCredits:AddTab("Credits")
        local rtDisc = Tabs.Main:AddRightTabbox("Discord")
        local tDisc = rtDisc:AddTab("Discord")
        do -- clicking section
            tFarm:AddToggle("autoclick", {Text = "Auto click",Default = false,Tooltip = "Disable effects from game settings"}):AddKeyPicker("AutoplayerBind", {Default = "E",NoUI = true,SyncToggleState = true})
            tFarm:AddButton("Unlock x2 click boost", function() plr.Boosts.DoubleClicks.isActive.Value = true end)
            tFarm:AddDivider()
            tFarm:AddToggle("auto_wheel", {Text = "Auto collect wheel prize",Default = false})
            tFarm:AddToggle("autogifts", {Text = "Auto collect random gifts",Default = false})
            tFarm:AddToggle("auto_achievements", {Text = "Auto collect achievements",Default = false})
            tFarm:AddToggle("auto_chests", {Text = "Auto collect chests",Default = false,Tooltip = "This feature might cause lag"})
            tFarm:AddButton("Collect chests", function()
                for _, v in pairs(wrk.Chests:GetChildren()) do
                    rep.Events.Client.claimChestReward:InvokeServer(v.Name)
                end
            end)
            tFarm:AddDivider()
            tFarm:AddToggle("auto_jumps", {Text = "Auto buy jumps",Default = false})
            tFarm:AddToggle("auto_buy_buttons", {Text = "Auto buy rebirth buttons",Default = false,Tooltip = "This feature buy the pets aswell"})
        end
        do -- pets and rebirths
            tP:AddDropdown("egg", {Values = getEggs(),Default = "~~~",Multi = false,Text = "Eggs"})
            tP:AddToggle("auto_hatch", {Text = "Auto hatch",Default = false})
            tP:AddToggle("auto_x2_hatch", {Text = "Auto x2 hatch",Default = false})
            tP:AddToggle("auto_x3_chests", {Text = "Auto x3 hatch",Default = false})
            local luckB = tP:AddButton("Unlock x2 luck boost",function() plr.Boosts.DoubleLuck.isActive.Value = true end)
            luckB:AddTooltip("Might be visual, not sure")
            tP:AddDivider()
            tP:AddToggle("auto_best", {Text = "Auto equip best",Default = false})
            tP:AddButton("Instant mass delete", function()
                rep.Events.Client.petsTools.deleteUnlocked:FireServer()
            end)
            tP:AddButton("Craft shiny all", function()
                for _, v in next, plr.petOwned:GetChildren() do
                    rep.Events.Client.upgradePet:FireServer(v.name.Value, 1, v)
                end
            end)
            tP:AddButton("Craft golden all", function()
                for _, v in next, plr.petOwned:GetChildren() do
                    rep.Events.Client.upgradePet:FireServer(v.name.Value, 2, v)
                end
            end)
            tB:AddDropdown("rebirth", {Values = giveRebirths(),Default = "~~~",Multi = false,Text = "Rebirths"})
            tB:AddToggle("auto_rebirth", {Text = "Auto rebirth",Default = false})
            tB:AddInput("inf_rebirth", {Default = "~~~",Numeric = true,Finished = false})
            tB:AddToggle("auto_inf_rebirth", {Text = "Auto inf. rebirth",Default = false})
        end
        do -- teleport
            tTP:AddDropdown("zone", {Values = giveZones(),Default = "~~~",Multi = false,Text = "Zones"})
            tTP:AddButton("Teleport", function()
                teleportTo(wrk.Zones[Options.zone.Value].Island.Platform.UIPart)
            end)
        end
        do -- local player
            tPLR:AddSlider("walkspeed", {Text = "Walkspeed value",Default = 16,Min = 16,Max = 200,Rounding = 0,Compact = false})
            tPLR:AddSlider("jumppower", {Text = "Jumppower value",Default = 50,Min = 50,Max = 200,Rounding = 0,Compact = false})
        end
        do -- Misc.
            tMisc:AddButton("Collect all codes", function()
                local codesTable = {"150KCLICKS", "125KLUCK", "100KLIKES", "75KLIKES", "50KLikes", "30klikes",
                                    "20KLIKES", "freeautohatch", "175KLIKELUCK", "225KLIKECODE", "200KLIKECODE",
                                    "250KLIKECLICKS", "275K2XSHINY", "300SHINYCHANCE", "300DOUBLELUCK", "325CLICKS2","twitter100k",
                                    "tokcodeluck12", "LIKECLICK12", "2xlongluck350"}
                for _, v in pairs(codesTable) do rep.Events.Client.useTwitterCode:InvokeServer(v) end
            end)
            tMisc:AddButton("Unlock auto clicker gamepass",
                function() Gamepass.Value = Gamepass.Value .. ";autoclicker;" end)
            tMisc:AddButton("Unlock auto rebirth gamepass",
                function() Gamepass.Value = Gamepass.Value .. ";autorebirth;" end)
        end
        do -- Credits
            tCredits:AddLabel("Script: <font color='#3EB489'>Trustsense</font>")
            tCredits:AddLabel("Hot library: <font color='#ADD8E6'>wally</font>")
            tCredits:AddLabel("Additional Help: <font color='#5865F2'>Discord !0000</font>")
        end
        do
            tDisc:AddButton("Copy discord invite", function() setclipboard("https://discord.gg/JUEu7XFBXD") end)
            local DiscButton = tDisc:AddButton("Open discord invite", function() Invite() end)
            DiscButton:AddTooltip("You need to have discord open.")
        end
        do -- Ui settings
            local MenuGroup = Tabs["UI Settings"]:AddLeftGroupbox("Menu")
            MenuGroup:AddButton("Unload", function() Library:Unload() end)
            MenuGroup:AddLabel("Menu bind"):AddKeyPicker("MenuKeybind", {Default = "End",NoUI = true,Text = "Menu keybind"})
            Library.ToggleKeybind = Options.MenuKeybind
            ThemeManager:SetLibrary(Library)
            SaveManager:SetLibrary(Library)
            SaveManager:IgnoreThemeSettings()
            SaveManager:SetIgnoreIndexes({"MenuKeybind"})
            ThemeManager:SetFolder("MyScriptHub")
            SaveManager:SetFolder("MyScriptHub/collectallpets!")
            SaveManager:BuildConfigSection(Tabs["UI Settings"])
            ThemeManager:ApplyToTab(Tabs["UI Settings"])
        end
    end

    -- script
    rs.RenderStepped:connect(function()
        if Toggles.autoclick.Value then getsenv(plr.PlayerGui.mainUI.HUDHandler).activateClick() end
        if Toggles.auto_wheel.Value then
            if plr.Data.freeSpinTimeLeft.Value == 0 then rep.Events.Client.spinWheel:InvokeServer() end
        end
        if Toggles.autogifts.Value then
            for i, v in pairs(getconnections(plr.PlayerGui.randomGiftUI.randomGiftBackground.Background.confirm.MouseButton1Click)) do v.Function() end
        end
        if Toggles.auto_achievements.Value then
            for i, v in next, plr.currentQuests:GetChildren() do
                if v.questCompleted.Value == true then rep.Events.Client.claimQuest:FireServer(v.Name) end
            end
        end
        if Toggles.auto_chests.Value then
            for _, v in next, wrk.Chests:GetChildren() do
                rep.Events.Client.claimChestReward:InvokeServer(v.Name)
            end
        end
        if Toggles.auto_jumps.Value then
            for _, v in next, wrk.Clouds:GetChildren() do
                rep.Events.Client.upgrades.upgradeDoubleJump:FireServer(v.Name, 1)
            end
        end
        if Toggles.auto_buy_buttons.Value then
            for _, v in next, shopTable() do rep.Events.Client.purchaseRebirthShopItem:FireServer(v) end
        end
        if Toggles.auto_hatch.Value then
            rep.Events.Client.purchaseEgg2:InvokeServer(wrk.Eggs[Options.egg.Value], false, false)
        end
        if Toggles.auto_x2_hatch.Value then
            rep.Events.Client.purchaseEgg2:InvokeServer(wrk.Eggs[Options.egg.Value], false, false, true)
        end
        if Toggles.auto_x3_chests.Value then
            rep.Events.Client.purchaseEgg2:InvokeServer(wrk.Eggs[Options.egg.Value], true, false)
        end
        if Toggles.auto_best.Value then
            if plr.PlayerGui.framesUI.petsBackground.Background.background.tools.equipBest.BackgroundColor3 ==
                Color3.fromRGB(64, 125, 255) then rep.Events.Client.petsTools.equipBest:FireServer() end
        end
        if Toggles.auto_rebirth.Value then rebMod.requestRebirth(tonumber(Options.rebirth.Value)) end
        if Toggles.auto_inf_rebirth.Value then rebMod.requestRebirth(tonumber(Options.inf_rebirth.Value)) end
        plr.Character.Humanoid.WalkSpeed = Options.walkspeed.Value
        plr.Character.Humanoid.JumpPower = Options.jumppower.Value
    end)
end```

attempt to call nil value newproxy

Issue with running a build .exe because of nil value in global newproxy

Error:
line 254: attempt to call a nil valie (global newproxy)

HELP: Node.JS Execution

How would I track the script's progress in NodeJS such as displaying on my website what process of obfuscation is running?

attempt to call a nil value

Describe the bug
lua: .\src\prometheus\util.lua:254: attempt to call a nil value (global 'newproxy') stack traceback: .\src\prometheus\util.lua:254: in function 'prometheus.util.readonly' .\src\prometheus.lua:31: in main chunk [C]: in function 'require' .\src\cli.lua:13: in main chunk [C]: in function 'require' .\cli.lua:12: in main chunk [C]: in function 'require' prometheus-main.lua:1: in main chunk [C]: in ?

Expected behavior
this happens when I try running promethus-main.lua

[BUG] Doesn't launch

Describe the bug
Upon running lua ./cli.lua --preset Strong ./test.lua i get the following output

lua: ./src/obfuscator/util.lua:7: module 'bit' not found:
	no field package.preload['bit']
	no file './src/bit.lua'
	no file './src/bit.lua'
	no file './bit.lua'
	no file '/usr/share/lua/5.4/bit.lua'
	no file '/usr/share/lua/5.4/bit/init.lua'
	no file '/usr/lib/lua/5.4/bit.lua'
	no file '/usr/lib/lua/5.4/bit/init.lua'
	no file './bit.lua'
	no file './bit/init.lua'
	no file '/usr/lib/lua/5.4/bit.so'
	no file '/usr/lib/lua/5.4/loadall.so'
	no file './bit.so'
stack traceback:
	[C]: in function 'require'
	./src/obfuscator/util.lua:7: in main chunk
	[C]: in function 'require'
	./src/obfuscator/enums.lua:8: in main chunk
	[C]: in function 'require'
	./src/obfuscator/pipeline.lua:10: in main chunk
	[C]: in function 'require'
	./src/prometheus.lua:16: in main chunk
	[C]: in function 'require'
	./src/cli.lua:13: in main chunk
	[C]: in function 'require'
	./cli.lua:12: in main chunk
	[C]: in ?

Expected behavior
The file was supposed to run properly

To Reproduce
Steps to reproduce the behavior:
Have an arch system with the following lua-related packages installed:
lua 5.4.3-1
lua51 5.1.5-9
lua52 5.2.4-5
lua53 5.3.6-1
luajit 2.0.5-3
luarocks 3.8.0-1

git clone the repo, cd into it, and do lua ./cli.lua --preset Strong ./test.lua

Prometheus will not properly use the Strong preset

When I try to use the --preset Strong, it returns me with this output and provides no file:
image
I'm not sure what may be causing this to happen, it worked fine before and the Medium and Weak presets work fine

[BUG] Obfuscation generates erroring code

Describe the bug
Code works fine without obfuscation but errors once obfuscated.

Expected behavior
Obfuscated code doesn't error.

To Reproduce
Obfuscate on weak or higher:

function example() end

local tbl = {
    "test1",
}

local Y = {}
for _, x in ipairs( tbl ) do
    example( x, example(), function()
        if Y[x] then return end
    end )
end

Run output

return(function(...)local k={"W7adM3IEglo8flNQ";"ghp8fhk1";"gXkXMMN565zuu2cYgPf=";"JizVuhL=";"bJ4NbJIY","JizrBHmPwt==";"gauDviu5bJkxuOrYmXj=","Jiz3f8==","gUWYg7X=";"mhWrvXSbMMPu66IJ";"uJNNBJ4VuK=="}for g,Z in ipairs({{1,11},{1;7};{8;11}})do while Z[1]<Z[2]do k[Z[1]],k[Z[2]],Z[1],Z[2]=k[Z[2]],k[Z[1]],Z[1]+1,Z[2]-1 end end local function g(g)return k[g-25039]end do local g=string.char local Z=type local B=table.concat local S=k local p=math.floor local U=table.insert local G=string.len local i={M=19;b=26,w=30,K=16;V=44,["0"]=42,t=0,["/"]=36,["1"]=43;["8"]=48,["+"]=15;f=24;I=9;C=58;n=14;a=5,j=12;T=32,k=13;u=25;m=17;l=55;Z=54;d=46,O=7,["2"]=35;F=60,["4"]=1,z=61;S=49,["9"]=40;c=8;s=31;E=11,y=62,G=63,["6"]=20;P=37,Y=51,D=45;p=57,Q=2;["5"]=52;["3"]=39;["7"]=3,N=33;L=56,g=29;X=4;B=27;W=21;v=18,x=34,e=47;A=10;r=41,o=28;h=22,i=53;J=23,H=38;q=59,R=50,U=6}local l=string.sub for k=1,#S,1 do local c=S[k]if Z(c)=="string"then local Z=G(c)local J={}local Q=1 local Y=0 local N=0 while Q<=Z do local k=l(c,Q,Q)local B=i[k]if B then Y=Y+B*64^(3-N)N=N+1 if N==4 then N=0 local k=p(Y/65536)local Z=p((Y%65536)/256)local B=Y%256 U(J,g(k,Z,B))Y=0 end elseif k=="="then U(J,g(p(Y/65536)))if Q>=Z or l(c,Q+1,Q+1)~="="then U(J,g(p((Y%65536)/256)))end break end Q=Q+1 end S[k]=B(J)end end end return(function(k,B,S,p,U,G,i,z,N,x,J,c,l,Z,Q,s,Y)c,s,Y,z,J,Q,N,Z,l,x={},function(k)c[k]=c[k]-1 if 0==c[k]then c[k],l[k]=nil,nil end end,function(k)for g=1,#k,1 do c[k[g]]=1+c[k[g]]end if S then local Z=S(true)local B=U(Z)B[g(25041)],B[g(25043)],B[g(25050)]=k,N,function()return 357251 end return Z else return p({},{[g(25043)]=N,[g(25041)]=k;[g(25050)]=function()return 357251 end})end end,function(k,g)local B=Y(g)local S=function(...)return Z(k,{...},g,B)end return S end,function()Q=Q+1 c[Q]=1 return Q end,0,function(k)local g,Z=1,k[1]while Z do c[Z],g=c[Z]-1,1+g if c[Z]==0 then c[Z],l[Z]=nil,nil end Z=k[g]end end,function(Z,S,p,U)local q,X,Q,O,N,e,z,j,Y,c,i,b,W while Z do if Z<9405114 then if Z<7267812 then if Z<6381064 then i=g(25046)Z=x(12763072,{})c=S k[i]=Z Y=J()i=g(25044)Z={i}Q=Z Z={}l[Y]=Z i=g(25040)Z=k[i]N={Z(Q)}z=N[2]q=N[3]i=N[1]N=i Z=8643889 else i={}Z=k[g(25045)]end else if Z<9129243 then q,b=N(z,q)Z=q and 9936907 or 10661098 else Z=k[g(25042)]i={}end end else if Z<11729453 then if Z<10208156 then W=q X=g(25046)Z=k[X]j=l[b]e=g(25046)O=k[e]e=O()O=x(13862079,{Y;b})X=Z(j,e,O)Z=8643889 W=nil b=s(b)else Y=s(Y)Z=k[g(25049)]i={}Q=nil end else if Z<13322075 then Z=k[g(25047)]i={}else i=l[p[1]]c=l[p[2]]Z=i[c]Z=Z and 6385247 or 9379205 end end end end Z=#U return B(i)end,{},function(k,g)local B=Y(g)local S=function(S,p,U,G)return Z(k,{S;p,U;G},g,B)end return S end return(z(6375508,{}))(B(i))end)(getfenv and getfenv()or _ENV,unpack or table[g(25048)],newproxy,setmetatable,getmetatable,select,{...})end)(...)

lua: [string "<eval>"]:1: attempt to perform arithmetic on field '?' (a nil value)

[SUGGESTION] Option to disable watermark

Currently obfuscated code is shipped with the code below in front of it, I couldn't find a way to disable it through cli thus I'd like to suggest a cli option to disable this. It's not a big deal, but most other obfuscators allow you to disable a text like this.

--[[
    Obfuscated using Prometheus Alpha v0.2 by levno-710
]]

[BUG] seed collision causing wrong strings to be returned from cached during string decryption.

Describe the bug
EncryptStrings.lua does not check for seed collisions and occasionally generates same seeds. When there are 2 strings with same seed, it will always return the string that was decrypted first.

Expected behavior
usedSeeds declared in EncryptStrings.lua line 28, is not being used for some reason

To Reproduce
Obfuscate a file with a bunch of "AAAA", "BBBB" strings in it. If you're unlucky (aka seed collides), one of them will get decrypted wrong.

Additional context
To fix this, simply just add usedSeeds[seed] = true; at line 65. lol......

[BUG] The Vmify step fails with "Unresolved Upvalue, this error should not occur!"

Describe the bug
When trying to run Prometheus on mobdebug.lua using the Weak preset the process fails with "Unresolved Upvalue, this error should not occur!"

Expected behavior
Prometheus should successfully process the file.

To Reproduce
Steps to reproduce the behavior:

  • Download mobdebug.lua
  • Run lua cli.lua --preset Weak --out mobdebug.out.lua mobdebug.lua
  • Observe error in the Vmify step:
PROMETHEUS: Applying Step "Vmify" ...
PROMETHEUS: Unresolved Upvalue, this error should not occur!
lua: src/logger.lua:54: Unresolved Upvalue, this error should not occur!
stack traceback:
	[C]: in function 'error'
	src/logger.lua:54: in function 'errorCallback'
	src/logger.lua:57: in function 'error'
	src/prometheus/compiler/compiler.lua:186: in function 'oldGetUpvalueId'
	src/prometheus/compiler/compiler.lua:1043: in function 'getUpvalueId'
	src/prometheus/compiler/compiler.lua:1945: in function 'compileExpression'
	src/prometheus/compiler/compiler.lua:2107: in function 'compileExpression'
	src/prometheus/compiler/compiler.lua:1558: in function 'compileStatement'
	src/prometheus/compiler/compiler.lua:1129: in function 'compileBlock'
	src/prometheus/compiler/compiler.lua:1085: in function 'compileFunction'
	...
	src/prometheus/compiler/compiler.lua:1485: in function 'compileStatement'
	src/prometheus/compiler/compiler.lua:1129: in function 'compileBlock'
	src/prometheus/compiler/compiler.lua:1004: in function 'compileTopNode'
	src/prometheus/compiler/compiler.lua:202: in function <src/prometheus/compiler/compiler.lua:98>
	(tail call): ?
	src/prometheus/pipeline.lua:187: in function 'apply'
	src/cli.lua:132: in main chunk
	[C]: in function 'require'
	cli.lua:12: in main chunk
	[C]: ?

[BUG] Certain strings can block obfuscation due to lexing errors

Describe the bug
Certain strings cause lexing errors preventing obfuscation.

To Reproduce

Try to obfuscate:

local test = [=[
unescape(encodeURI(_0x4642b)) + '\u0d80', _0x51c383 = _0x480094[_0x1f6b0d(0x29d)];
]=]

PROMETHEUS: Lexing Error at Position 2:36, Unexpected char "0"! Expected one of "{"

[BUG] Luau - Ternary operators not supported

Describe the bug
It looks like ternary operators (x = if condition then true else false) aren't supported:

PROMETHEUS: Applying Obfuscation Pipeline to .\test.luau ...
PROMETHEUS: Parsing ...
PROMETHEUS: Parsing Error at Position 1:10, Unexpected Token "if". Expected a Expression!

Expected behavior
Ternary operators for luau to be supported and not error.

To Reproduce
Steps to reproduce the behavior:

  1. Use the following test file
local x = if true then "yes" else "no"
  1. Input the file to Prometheus either via a lua script or cli

If your problem is a non-working obfuscated file, please also include a minimal source code example, your config file as well as the output file that you got.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.
Windows 11 x64, Lua 5,1

[Feature Request] Allow Non-ASCII characters in identifier

While LuaJIT can handle Non-ASCII characters correctly(http://luajit.org/extensions.html), Prometheus was only accept ASCII characters. It is inconvenient to work with many domain specific scripts that may contain a lot Russian/Chinese identifiers.

For example, this script is totally valid in LuaJIT but unable to be obfuscated by Prometheus:

Привет = 1
print(Привет)

Error while parsing Non-ASCII characters:

PROMETHEUS: Applying Obfuscation Pipeline to test.lua ...
PROMETHEUS: Parsing ...
PROMETHEUS: Lexing Error at Position 15:26, Unexpected char "\178"!
luajit: ../Prometheus/src\logger.lua:54: Lexing Error at Position 15:26, Unexpected char "\178"! 
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\tokenizer.lua:512: in function 'next'
        ../Prometheus/src\prometheus\tokenizer.lua:518: in function 'scanAll'
        ../Prometheus/src\prometheus\parser.lua:143: in function 'parse'
        ../Prometheus/src\prometheus\pipeline.lua:178: in function 'apply'
        ../Prometheus/src\cli.lua:132: in main chunk
        [C]: in function 'require'
        ../Prometheus/cli.lua:12: in main chunk
        [C]: at 0x005f31a0

Probably related to:
https://github.com/levno-710/Prometheus/blob/e639587547077bab61047712720d88722d0c5fbd/src/prometheus/enums.lua#L33

[BUG] DivExpression problem on division by 0

Describe the bug
The DivExpression in ast.lua has a simplify argument which will perform the division and store the result if both left and right-hand side of the expression is a constant. This works great in all cases except when dividing by 0.

print(1/0) -- inf
print(-1/0) -- -inf
print(0/0) -- nan

The above three expressions return constants inf and nan of type number. The problem when simplifying this is that the resulting string will become:

print(inf) -- nil
print(-inf) -- attempt to perform arithmetic on global 'inf' (a nil value)
print(nan) -- nil

Expected behavior
The DivExpression should not simplify the expression when the right hand side is 0.

To Reproduce
Steps to reproduce the behavior:

  • Create a file divexpression.lua containing print(-1/0)
  • Run lua cli.lua --preset Weak divexpression.lua

Observe divexpression.obfuscated.lua

[BUG]

Bug Happen When Try To Use powershell function
powershell cant download items(txt>notepad)> i use rentry domain (using this obfus) >for reading files (Work Perfectly) > but you need double encryption or more or else its will crash

i tried using source code ( its can download and regenerated files to this >$user = "C:\Users" + $env:UserName + "\AppData\Local\tested.txt"

function psell()
    local regen = [[
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    $user = "C:\Users\" + $env:UserName + "\AppData\Local\tested.txt"
    $WebClient = New-Object net.webclient
    $raw = $WebClient.DownloadString("]]..link..[[")
    Set-Content -Path $user -Value $raw
    ]]
    local pipe = io.popen("powershell -command -", "w")
    pipe:write(regen)
    pipe:close()
end

[BUG] Vmify in certain conditions produces code that randomly stops working

Describe the bug
As best as I can tell is that too many control structures (if, for) is a struggle as soon as the virtual machine (Vmify) setting is enabled. It took me a long while to make a script that can reliably re-produce the issue without containing any sensitive code (see at the bottom).

My more complex scripts will encounter this bug often. It manifests in that execution stops right when a nested control structure in a table function is supposed to end. A print at the end of the affected control structure will still go through, right outside after it will no longer happen. Call stack doesn't seem to matter, the function is inherently broken. No exception is fired either.

If you move the function around in the file, so will the issue shift to a different place in the code (or sometimes no longer happen). Removing a single if control block anywhere in the file can also fix the issue or move it to a different place. However the amount of code inside the control structures seems to have no effect on the bug (as long as you don't add more control structures that is).

Expected behavior
That even more complex scripts don't have this issue with control structures as soon as you use Vmify.

To Reproduce
Use the following nonsense script and note how you get 3 logs unobfuscated: "Pre bug", "For loop" and "Post bug". Now obfuscate the script with the Vmify, ConstantArray, NumbersToExpressions and WrapInFunction setting and find that now only the first 2 logs fire and the last one never happens. Leave out the Vmify setting and it all works fine. Even using the Vmify setting standalone already causes the bug.

The source script: https://pastebin.com/6vtiNN6t
The obfuscated broken script: https://pastebin.com/9yVSSbSy
The config settings: https://pastebin.com/jCxEGGBF

Additional context
Lua 5.1

[Suggestion] Support Lua in gamesense

gamesense is a cheat for CSGO, provides LuaJIT(+ Lua 5.1) lua enviroment, but supports unicodes in variable name
renamer with unicode support will be pretty confusing

[Feature Request] In-Browser Obfuscator

I would like to have the same type of thing javascript-obfuscator has where you can just paste the code in your browser and it pops out.

Just got the latest version of Lua to compile with emscripten...hopefully I can make a simple page to run Prometheus on.

[BUG] ENOBUFS

Getting an ENOBUFS error with a 5,000 line lua script. LuaU, Medium.

[BUG] Using an invalid option results in a Lua error

Describe the bug
When you provide an invalid option the parser in cli.lua chokes when trying to present an error message:

cli.lua:86: bad argument #2 to 'format' (value expected)
stack traceback:
	[C]: in function 'format'
	...q53d3qg84mb4gjdm5hk40000gn/T/3334399680767961943/cli.lua:86: in main chunk
	[C]: at 0x01042bcd60

(please ignore the weird path, I'm, running Prometheus from a temp folder)

The problem is that string.format() is used but no argument is provided:

https://github.com/levno-710/Prometheus/blob/master/src/cli.lua#L86

Expected behavior
Prometheus should present which option that is invalid.

To Reproduce
Steps to reproduce the behavior:

  1. Call Prometheus with an invalid option:
  2. Observe error

for repl.it pls

Describe the bug
A clear and concise description of what the bug is.

Expected behavior
A clear and concise description of what you expected to happen.

To Reproduce
Steps to reproduce the behavior:

If your problem is a non-working obfuscated file, please also include a minimal source code example, your config file as well as the output file that you got.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

ProxifyLocals Combined with Vmify creates peformance issues

Describe the bug
I've noticed that performance drops significantly when im using the Strong preset, after trying out a lot of stuff i've noticed that VM and Proxify run fine on their own but get very bad when combined. I'm using Garry's mod lua enviroment for this.

The code im using to test:

local SysTime = SysTime
local Distance = FindMetaTable("Vector").Distance

local vec1 = Vector(1, 2, 3)
local vec2 = Vector(13, 26, -10)

local count = 10000

local StartTime = SysTime()

for i = 1, count do
	-- Repeat an action 10,000 times to check how long it takes on average
	-- Example action:
	Distance(vec1 , vec2)
end

local EndTime = SysTime()
local TotalTime = EndTime - StartTime
local AverageTime = TotalTime / count

print("Custom Total: " .. TotalTime .. " seconds. Average: " .. AverageTime .. " seconds.")

image
As you can see here, strong significantly increases the time it takes for the benchmark to run.
image
In this screenshot i compare it to my custom preset which is basically Strong without using proxify locals
image

And for reference, this is Strong without VM and with proxify:
image
image

Expected behavior
Some way of using both of these methods at the same time without having peformance issues.

To Reproduce
As described before, any configuration that uses both VM and Proxify together will create a massive peformance sink.

Screenshots
See main explanation.

Additional context
Gmod lua wiki: https://wiki.facepunch.com/gmod/ Garry's mod uses Lua 5.1

[BUG] I get error when starting a obfuscated script

This error when I used Weak preset: attempt to index a function value (local 'J')
This error when I used Medium preset: attempt to call a boolean value (local 'Y')
This error when I used Strong preset: attempt to call a nil value (field '?')

Parser needs a recode!

The main reason this project fails in most places is the time it takes to obfuscate this because of the parser that needs a major update, it surprises me the amount of contributors yet no one has decide to start work on a new parser.....

[Suggestion] Error Handling

Describe the Suggestion
Prometheus should have error handling such as pcalls and then silently log them or show them in the console without having error stopping the program

Additional context
For this I would write pcalls to files and loadfile them.

[BUG] Strange error on Medium, but not on Strong preset

Describe the bug
I was getting an error when using the Medium preset, but not the Strong preset.

The error:

Tried to Add Child that is referencing a Higher non global variable!

Expected behavior
Given the same input, all presets should display the same behavior (all succeeding, or all failing).

To Reproduce
I simplified the code down to the simplest form that still displayed this bug:

do end
function a() end
math.min(0, 1)

If I remove any one of these lines, the Medium preset works fine.

Screenshots
image

I'll try to investigate later, but wanted to put up an issue in case you already knew the root cause.

Additional context
I'm using the master branch with the fix from this issue applied: #26

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.