Dark Byte Site Admin Reputation: 458 Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Fri Oct 07, 2016 4:15 pm Post subject: Hiding your script with encodeFunction/decodeFunction |
|
|
I personally find it silly that people spend so much time hiding their scripts, but since CE 6.6 you can encode functions and decode them in a way that doesn't convert it to pure text inbetween
an example of how to use it
Let's say you have a lua script like this:
Code: |
function myscript()
print('hello')
end
|
you can then encode this function using
Code: |
print(encodeFunction(myscript))
|
the result will be: (in 64-bit)
Code: |
c-oWpDNPJ!ketlRCB=/U!NS2(5ypT38s!d+42)bqGnmW70wmZN92guO7#LI;7#P)U8W?.;Vk}S0MVWaeENmI6IXU?@4A:kwWpWC7
|
to decode it, you use:
Code: |
myscript=decodeFunction('c-oWpDNPJ!ketlRCB=/U!NS2(5ypT38s!d+42)bqGnmW70wmZN92guO7#LI;7#P)U8W?.;Vk}S0MVWaeENmI6IXU?@4A:kwWpWC7')
|
and then you can just call it as you're used to:
Code: |
myscript=decodeFunction('c-oWpDNPJ!ketlRCB=/U!NS2(5ypT38s!d+42)bqGnmW70wmZN92guO7#LI;7#P)U8W?.;Vk}S0MVWaeENmI6IXU?@4A:kwWpWC7')
myscript()
hello
|
You can use multiple layers of encoding, encode the string inbetween if you like, and whatever you wish.
At no point during the decoding the original lua function will be reverted to play text. (perhaps lua bytecode, but that's about as readable as assembler, and I don't think those idiots that use a stringscan will be able to use it...)
For those that wish to try their hands on decoding it, take a look at:
Code: |
c-n1?-HxgT6ov6+E,!^wdefV;R_GvlKt:iSF9ZQaQ5@h1oY9C85R@d#MMWkg)]V;2w9nCZ;4UU3z35F;vh%II[R9WQzHFwzkH3ER@^1}-(ri=Ku=GAn[{0n+nTL6LOa@#+en13Tz%MNTus)szC-4dU?yLFATz]M=,hhOoPyKsqYaXqwc:63;fAoL(;)4L$el!bynT4ripP]STmj[L1L7w(vGa$LaX1d;F.gDC)I[P#b#-5tmPRA_yV4zbo10UcYYh@pD5u3N?lJxq.51nC;2vo1vC6d??J247kx;@co?Zm}$p!Mp]DNT*Zj*hQLsyFwGd[v4l*xmoKE2$_fykPVz@?:VyT3V8fheok!-sHJ+c7qkn1#ga3bT;P:)=8ONxqzm^)!rybxk=YEl_h(*y=3*KR59}B@05_og%opC?D4Obpn[B#q8kx(,U8vvahQTzATK3jxOs?9DPly{T_IyjnYf,U;yKsLMqd2J(9AR*j3}E;7![+J#0py^RfA{Pl09*,;f=h@v#PBP.)Rlx@/F8#he%xBvQ;zkB;oAypPCLn+Y%uuOp2O2wK%6[cz)lVJF;^4E{Z4sSsYj73Z}.%?M3%Q+}-7bA;,bU-CBo2O)Wk+e5rfvkX$GzK{Ri/e8i^]V?ed4lrQ;j,g$qEnC-(3k5V4qj^,^0*FF3dD0bKiuE=uo]FGGqyx8t)$d138hQaL*RCV{Tbtf)2/jcLciR*zTqm_Bz/9OF7*L!y.@fI}JQs$*b^cUmgGR4qJomxb!jVhw/Pn7/k84l=#mAe,@*sfycJRRBQq*r}G1)9Vo;D6e*:UNcj/O#K{bRBP73qiLb;Qo4@IUy@!DzZALgu9com4;?bJ1iNr$Ox,.Ii+:w-5a8-/?g5Ih3in9@YNVZx9Qj!G(b,,SOv#.g}1?rfU?)T)w42+9=S;#2I*BVVliB4T^)=$KLh-q^sw[p[p/
|
hint1: it's a function that takes a string as parameter (password)
hint2: the password is stupid (but do try to find it without being lazy )
hint3: there is no space at the end of that code _________________ Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
|
|