admin管理员组

文章数量:1345707

I’m trying to make a tool that encode python code to runnable code with only symbols. Now i can create any int (because bool is a subclass of int, you can make True with [[]]>[] and True+True == 2, True-True+True == 1, True-True == 0…), and use % format ("%c"%97 == "a", You can convert ascii code to char with %c format) to make any chars. Here’s currently my progress:

_="c";__=exec;__((("%"+_)%((([[]]>[])+([[]]>[])…

But, I still can’t make "c" and exec function with only symbols. so, if you know how to make "c" or exec with only symbols, or how to write symbol-only python code with other way, please can you tell me? …And sorry for my bad English, and i know probably here’s not a place for ask question like this, but i don’t know other places to ask question sorry.

I tried to make <class 'str'> <- this type object with only symbols(because str(str)[1] == "c"), but i couldn’t find way to do that.

本文标签: Is it possible to write python code with only symbols (like jjencode for JavaScript)Stack Overflow