Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ PyFuck Public

πŸ’˜ Write any Python with 9 Characters: e,x,c,h,r,(,+,1,)

Notifications You must be signed in to change notification settings

satoki/PyFuck

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /