defrun(): for root, dirs, files in os.walk(dir_path): for file_name in files: file_path = os.path.join(root, file_name) cmd = "{0} -LD:/mylog.log -c -A -S{1} {2}".format(ida64_path, ana_file, file_path) p = subprocess.Popen(cmd) p.wait()
defrun(): for root, dirs, files in os.walk(dir_path): for file_name in files: print(file_name) file_path = os.path.join(root, file_name) cmd = "{0} -LD:/mylog.log -c -A -S{1} {2}".format(ida64_path, ana_file, file_path) p = subprocess.Popen(cmd) p.wait()
if __name__ == "__main__": run()
只需python3 run.py即可
注意事项
IDA python中的API在7.4版本后产生了变化,如果本地使用的IDA Pro版本≥7.4,之前在网上搜的API可能就无法使用,旧版本与新版本相对应的API变化在这可以查询: