Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

15 Commits

Repository files navigation

💘PyFuck exchr(+1)

PyFuck is a strange playful code.
It uses only nine different characters to write Python3 code.
Inspired by aemkei/jsfuck

Demo: 💘PyFuck Playground

Example

The following source will do an __import__("os").system("ls"):

exec(chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)+chr(111+1)+chr(111)+chr(111+1+1+1)+chr(111+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+1)+chr(111)+chr(111+1+1+1+1)+chr(11+11+11+1)+chr(11+11+11+1+1+1+1+1+1+1+1)+chr(11+11+11+11+1+1)+chr(111+1+1+1+1)+chr(111+1+1+1+1+1+1+1+1+1+1)+chr(111+1+1+1+1)+chr(111+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)+chr(11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+chr(111+1+1+1+1)+chr(11+11+11+1)+chr(11+11+11+1+1+1+1+1+1+1+1))

Basics

"0"=>chr(48) =>chr(11+11+11+11+1+1+1+1)
"1"=>chr(49) =>chr(11+11+11+11+1+1+1+1+1)
"2"=>chr(50) =>chr(11+11+11+11+1+1+1+1+1+1)
"A"=>chr(65) =>chr(11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)
"B"=>chr(66) =>chr(11+11+11+11+11+11)
"C"=>chr(67) =>chr(11+11+11+11+11+11+1)
"a"=>chr(97) =>chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)
"b"=>chr(98) =>chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)
"c"=>chr(99) =>chr(11+11+11+11+11+11+11+11+11)
"+"=>chr(43) =>chr(11+11+11+1+1+1+1+1+1+1+1+1+1)
"-"=>chr(45) =>chr(11+11+11+11+1)
"("=>chr(40) =>chr(11+11+11+1+1+1+1+1+1+1)
")"=>chr(41) =>chr(11+11+11+1+1+1+1+1+1+1+1)
"["=>chr(91) =>chr(11+11+11+11+11+11+11+11+1+1+1)
"]"=>chr(93) =>chr(11+11+11+11+11+11+11+11+1+1+1+1+1)
etc.

Execute print(1)

"p"=>chr(111+1)
"r"=>chr(111+1+1+1)
"i"=>chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)
"n"=>chr(11+11+11+11+11+11+11+11+11+11)
"t"=>chr(111+1+1+1+1+1)
"("=>chr(11+11+11+1+1+1+1+1+1+1)
"1"=>chr(11+11+11+11+1+1+1+1+1)
")"=>chr(11+11+11+1+1+1+1+1+1+1+1)
"print(1)"=>chr(111+1)+chr(111+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+11)+chr(111+1+1+1+1+1)+chr(11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+11+1+1+1+1+1)+chr(11+11+11+1+1+1+1+1+1+1+1)
exec("print(1)") =>exec(chr(111+1)+chr(111+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+11)+chr(111+1+1+1+1+1)+chr(11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+11+1+1+1+1+1)+chr(11+11+11+1+1+1+1+1+1+1+1))

Usage

$ echo'print("PyFuck!!!")'> test.py
$ python3 main.py
____ _____ _
| _ \ _ _| ___| _ ___|| __
||_) |||||_ ||||/ __||/ /
| __/||_|| _|||_|| (__|<|_|\__, |_|\__,_|\___|_|\_\
|___/
by satoki, xryuseix
FileName: test.py
-> output.py
$ python3 output.py
PyFuck!!!
$ cat output.py
exec(chr(111+1)+chr(111+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+11)+chr(111+1+1+1+1+1)+chr(11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+1)+chr(11+11+11+11+11+11+11+1+1+1)+chr(111+1+1+1+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+1+1+1+1)+chr(111+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1)+chr(11+11+11)+chr(11+11+11)+chr(11+11+11)+chr(11+11+11+1)+chr(11+11+11+1+1+1+1+1+1+1+1)+chr(1+1+1+1+1+1+1+1+1+1))

About

💘 Write any Python with 9 Characters: e,x,c,h,r,(,+,1,)

Resources

Stars

20 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages