输入流程更新 添加自动输出脚本
This commit is contained in:
parent
5de6c4568c
commit
73c9da0599
18
ida_file_cerate.bat
Normal file
18
ida_file_cerate.bat
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
set "IDA_PATH=D:\IDA_Pro_v6.8\idaq.exe"
|
||||||
|
set "FOLDER_PATH=D:\bishe\Gencoding\A2C"
|
||||||
|
set "SCRIPT_PATH=../raw-feature-extractor/preprocessing_ida.py"
|
||||||
|
set "SAVE_PATH=../store/"
|
||||||
|
set "LOG_PATH=../log/"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for %%f in ("%FOLDER_PATH%\*.exe") do (
|
||||||
|
echo !time! %%f
|
||||||
|
%IDA_PATH% -c -B -S"%SCRIPT_PATH% --path %SAVE_PATH%" %%f
|
||||||
|
)
|
||||||
|
|
||||||
|
endlocal
|
||||||
|
|
19
ida_print.py
Normal file
19
ida_print.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
directory = './'
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
cmd = 'D:\IDA_Pro_v6.8\idaq.exe -c -S"raw-feature-extractor/preprocessing_ida.py --path ./store/" '
|
||||||
|
|
||||||
|
for filename in os.listdir(directory):
|
||||||
|
if filename[-3:] == 'exe':
|
||||||
|
process = subprocess.Popen(["powershell", cmd+filename], stdout=subprocess.PIPE)
|
||||||
|
|
||||||
|
output = process.communicate()[0]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
|||||||
|
import idc
|
||||||
from func import *
|
from func import *
|
||||||
from raw_graphs import *
|
from raw_graphs import *
|
||||||
from idc import *
|
from idc import *
|
||||||
@ -13,8 +14,11 @@ def parse_command():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
# def main_op(store_file_path):
|
||||||
args = parse_command()
|
args = parse_command()
|
||||||
|
# path = os.path.join("../")
|
||||||
path = idc.ARGV[2]
|
path = idc.ARGV[2]
|
||||||
|
print os.getcwd()
|
||||||
analysis_flags = idc.GetShortPrm(idc.INF_START_AF)
|
analysis_flags = idc.GetShortPrm(idc.INF_START_AF)
|
||||||
analysis_flags &= ~idc.AF_IMMOFF
|
analysis_flags &= ~idc.AF_IMMOFF
|
||||||
# turn off "automatically make offset" heuristic
|
# turn off "automatically make offset" heuristic
|
||||||
@ -25,3 +29,6 @@ if __name__ == '__main__':
|
|||||||
fullpath = os.path.join(path, binary_name)
|
fullpath = os.path.join(path, binary_name)
|
||||||
pickle.dump(cfgs, open(fullpath, 'w'))
|
pickle.dump(cfgs, open(fullpath, 'w'))
|
||||||
idc.Exit(0)
|
idc.Exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,3 +95,5 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user