Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -4,8 +4,6 @@ import json
|
|
4 |
import os
|
5 |
import subprocess
|
6 |
|
7 |
-
DUMMY_ADDR = 0x1000
|
8 |
-
|
9 |
def predict(decompiled_code):
|
10 |
|
11 |
with tempfile.TemporaryDirectory() as temp_dir:
|
@@ -17,9 +15,9 @@ def predict(decompiled_code):
|
|
17 |
f.write('#include "/home/ReSym/clang-parser/defs.hh"\n' + decompiled_code)
|
18 |
|
19 |
# subprocess.check_output(["python", "/home/ReSym/process_data/prep_decompiled.py", code_file_name, file_save_dir, parsed_save_dir])
|
20 |
-
output = subprocess.run(["/home/ReSym/clang-parser/build/field_access", code_file_name, field_file_name])
|
21 |
|
22 |
-
return output.stdout
|
23 |
|
24 |
|
25 |
def run():
|
|
|
4 |
import os
|
5 |
import subprocess
|
6 |
|
|
|
|
|
7 |
def predict(decompiled_code):
|
8 |
|
9 |
with tempfile.TemporaryDirectory() as temp_dir:
|
|
|
15 |
f.write('#include "/home/ReSym/clang-parser/defs.hh"\n' + decompiled_code)
|
16 |
|
17 |
# subprocess.check_output(["python", "/home/ReSym/process_data/prep_decompiled.py", code_file_name, file_save_dir, parsed_save_dir])
|
18 |
+
output = subprocess.run(["/home/ReSym/clang-parser/build/field_access", code_file_name, field_file_name], text=True, capture=True)
|
19 |
|
20 |
+
return output.stdout
|
21 |
|
22 |
|
23 |
def run():
|