GitBook: [master] one page modified

This commit is contained in:
CPol 2021-06-25 00:40:19 +00:00 committed by gitbook-bot
parent 4d2a878181
commit 5362d309b7
No known key found for this signature in database
GPG key ID: 07D2180C7B12D0FF

View file

@ -294,7 +294,7 @@ Moreover, if you think **other libraries** may be able to **invoke functions to
```python
bad_libraries_names = ["os", "commands", "subprocess", "pty", "importlib", "imp", "sys", "builtins", "pip"]
bad_func_names = ["system", "getstatusoutput", "getoutput", "call", "Popen", "spawn", "import_module", "__import__", "load_source", "execfile", "execute", "__builtins__"]
bad_func_names = ["system", "popen", "getstatusoutput", "getoutput", "call", "Popen", "spawn", "import_module", "__import__", "load_source", "execfile", "execute", "__builtins__"]
for b in bad_libraries_names + bad_func_names:
vuln_funcs = [ x.__name__ for x in ''.__class__.__base__.__subclasses__() if "wrapper" not in str(x.__init__) for k in x.__init__.__globals__ if k == b ]
print(f"{b}: {', '.join(vuln_funcs)}")