Hack Forums
[Python] Hidden Eval - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Hidden Eval (/showthread.php?tid=6196710)



Hidden Eval - MiguelSanchez - Mar 9, 2022

First you'll need this code above your evals, anywhere in the code (I mean, so long as it's in scope)
Code
O0=__builtins__.__dict__
oO,Ooo="6576616C","rchtyz"
oOo=sorted(Ooo)[:3]
Oo=-~False-~False;oOo="".join(oOo)
oo=-~(''=='')-~(''=='')<<Oo
OO=type(~False)(oO,oo)
O=lambda o: "" if o==0 else O(int(o/256))+O0[oOo](o%256)

The eval is encoded as O0[O(OO)]

Code
O0[O(OO)](1+1) #eval(1+1)

There'd be neater ways to do it, but I really wanted to cover a few bases, I think even experienced python programmers will probably pick up a trick.

I thought I remembered py2 allowing comparisons between dictionaries and tuples, but I couldn't do any gross stuff with that 😥

Enjoy


RE: Hidden Eval - Kr0n0s - Mar 9, 2022

fuck i probably got ratted at least once before up till now from all the shady pythons i try from github