PyFuck is a JSFuck alternative for Python,
making it possible to write any Python3 program using only 8 unique characters: exc(%=')
It has only been tested in CPython 3.7 and upwards but should work for all distributions
of Python3 (send me a DM if you find an inconsistency)
0 chars
How does it work?
(any names in practice only contains e, x and c)
- n1=1 => exec('n1=%x'%(''==''))
- n0=0 => exec('n0=%x'%('e'==''))
- n3=3 => exec('n3=%x%%x'%n1%n1)
exec('n3=%x%%x%%%%x%%%%%%%%x'%n0%n3%n1%n1)
- n43=43 => exec('n43=%x%%x%%%%x'%n1%n0%n3)
exec('n43=%x'%n43)
exec('n43=%x'%n43)
- n2=2 => exec('n2=n1%cn1'%n43)
- ...
- prog='' => exec('''prog=('')''')
- prog+=chr(97) => exec('''prog%c=('%%c')'''%n43%n97)
- exec(prog) => exec(prog) :O
Links
Source code
Layout of jsfuck.com is not copyrightable right?