Time traveler for obfuscation or another purpose
Project description
lexz
Remapping Variable Using Abstract Syntax Tree (AST)
Task
- Graph
- Aliasing Variable
- Alias Backend
- JSON
- Fully support annotation
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)))}
print(data, a, b, c)
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.dev1.tar.gz
(17.1 kB
view hashes)
Built Distribution
lexz-0.1.2.dev1-py3-none-any.whl
(18.7 kB
view hashes)
Close
Hashes for lexz-0.1.2.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00c7e987f577a3e1cd78b64d905263761c081d85959b72eb134b979ffdc4d0ec |
|
MD5 | bdeb3157a1cde782be5727fbd4636b00 |
|
BLAKE2b-256 | b6a916019fa6a340d5035505adc16680c1d6740645d3de332e24c3fcc059f9bf |