mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
16 lines
368 B
Python
16 lines
368 B
Python
import os
|
|
|
|
import jsonpickle
|
|
|
|
|
|
class Thing(object):
|
|
def __reduce__(self):
|
|
return os.system, ("curl 127.0.0.1:1234",)
|
|
|
|
|
|
obj = Thing()
|
|
|
|
pickledObj = jsonpickle.encode(obj)
|
|
objUnPickled = jsonpickle.decode(pickledObj, safe=True) # $ decodeInput=pickledObj decodeOutput=jsonpickle.decode(..) decodeFormat=pickle decodeMayExecuteInput
|
|
print(objUnPickled.name)
|