Time traveler for obfuscation or another purpose
Project description
lexz
Remapping Variable Using Abstract Syntax Tree (AST)
Tutorial
Generate GraphViz File
python -m lexz -f test.py -g graph.dot
Generate SVG Image
python -m lexz test.py -g graph.dot
dot -Tsvg output.svg graph.dot
#in single line
python -m lexz -f test.py -g /dev/stdout|dot -Tsvg -o output.svg
Demo
Input
class HelloWorld:
def __init__(self) -> None:
try:
self.a = 3
except Exception:
self.b = 3
class HelloWorld2((child:=HelloWorld)):
def __init__(selx) -> None:
selx.a = 3
for i in range(10):
self.for_ = i
@dfunc((decorator:=10))
async def xyz(self, a):
async for i in range(10):
self.tesx = i
async with open("test3.py", "r") as f:
print(f.read())
lambda ho: 123
@(lambda:(call:=dfunc((arg:=2))))()
def FunDec():
data ={'a': (a:=(b:=(c:=3)))}
pass
def dfunc(arg):
def func(f):
def execute(*args, **kwargs):
return f(*args, **kwargs)
return execute
return func
Result Graphviz( Dot Graph )
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lexz-0.1.2.tar.gz
(16.2 kB
view details)
Built Distribution
lexz-0.1.2-py3-none-any.whl
(17.8 kB
view details)
File details
Details for the file lexz-0.1.2.tar.gz
.
File metadata
- Download URL: lexz-0.1.2.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1042-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 724d09291b11dc72ce063f5a033f216634f43d1cebfd5df675d3f8aee2d81f3a |
|
MD5 | 67ed6c1519df6af6fbbf918e38e36294 |
|
BLAKE2b-256 | 12bb125e359109420e5589fb1ad6cf6ed4915d21e7315fac865f70d8b4162583 |
File details
Details for the file lexz-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: lexz-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1042-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ee414a767fcaa0e124361ccbba54d8367c9ed2f1ec96d077de86e5bdfce426e |
|
MD5 | 0ae418d783fae2eb8986df433d1c32d2 |
|
BLAKE2b-256 | 80f3dfe28c2f1fa9b8c7e07dbe6d6d45797449879f6679533a8a06d73d67cbdb |