File size: 419 Bytes
e34f991 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import os
def run_bash():
res = os.system("ls -la")
print(res)
if __name__ == '__main__':
run_bash()
if __name__ == '__main__':
import pickle
class Vuln():
def __reduce__(self):
# return (os.system, ("echo 'I should have been stopped by the hook'",))
return (run_bash, ())
with open("vuln.pkl", "wb") as f:
pickle.dump(Vuln(), f)
|