mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 19:53:56 +00:00
27 lines
517 B
Python
27 lines
517 B
Python
import os
|
|
import subprocess
|
|
|
|
emulator_root = os.getenv('EMULATOR_ROOT')
|
|
analysis_sample = os.getenv('ANALYSIS_SAMPLE')
|
|
virtual_sample = 'C:/analysis-sample.exe'
|
|
|
|
application = 'analyzer'
|
|
|
|
def make_app(app):
|
|
if os.name == 'nt':
|
|
return app + ".exe"
|
|
|
|
return app
|
|
|
|
command = [
|
|
os.path.join(os.getcwd(), make_app(application)),
|
|
'-c',
|
|
'-e', emulator_root,
|
|
'-p', virtual_sample, analysis_sample,
|
|
virtual_sample
|
|
]
|
|
|
|
result = subprocess.run(command, cwd=os.getcwd())
|
|
|
|
exit(result.returncode)
|