Spaces:
Running
Running
Commit
·
ddf7ec4
1
Parent(s):
d717efb
dev
Browse files
main.py
CHANGED
@@ -6,11 +6,11 @@ import tempfile
|
|
6 |
|
7 |
def new_binary(file):
|
8 |
|
9 |
-
with tempfile.TemporaryDirectory() as
|
10 |
-
shutil.copy2(file.name,
|
11 |
|
12 |
# python3 generate.py --ghidra PATH_TO_GHIDRA_ANALYZEHEADLESS -t NUM_THREADS -n [NUM_FILES|None] -b BINARIES_DIR -o OUTPUT_DIR
|
13 |
-
output = subprocess.check_output(f"python /DIRTY/dataset-gen-ghidra/generate.py --ghidra /ghidra/support/analyzeHeadless -t 1 -b {
|
14 |
print(output)
|
15 |
|
16 |
|
|
|
6 |
|
7 |
def new_binary(file):
|
8 |
|
9 |
+
with tempfile.TemporaryDirectory() as TEMP_DIR, tempfile.TemporaryDirectory() as OUTPUT_DIR:
|
10 |
+
shutil.copy2(file.name, TEMP_DIR)
|
11 |
|
12 |
# python3 generate.py --ghidra PATH_TO_GHIDRA_ANALYZEHEADLESS -t NUM_THREADS -n [NUM_FILES|None] -b BINARIES_DIR -o OUTPUT_DIR
|
13 |
+
output = subprocess.check_output(f"python /DIRTY/dataset-gen-ghidra/generate.py --ghidra /ghidra/support/analyzeHeadless -t 1 -b {TEMP_DIR} -o {OUTPUT_DIR}")
|
14 |
print(output)
|
15 |
|
16 |
|