Update test_module.py
Browse files- test_module.py +10 -9
test_module.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
-
import os
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
| 10 |
return cls()
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import subprocess
|
| 3 |
+
|
| 4 |
+
class MaliciousModel:
|
| 5 |
+
def __init__(self, *args, **kwargs):
|
| 6 |
+
# 执行恶意代码
|
| 7 |
+
os.system("touch hack.txt")
|
| 8 |
+
|
| 9 |
+
@classmethod
|
| 10 |
+
def from_pretrained(cls, *args, **kwargs):
|
| 11 |
return cls()
|