auto created i64 added
parent
0f36daba75
commit
c530f629e7
26
comp.py
26
comp.py
|
@ -1,18 +1,26 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import os, time
|
||||||
|
|
||||||
|
from exetoi64 import make_i64
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
# Задается вручную
|
# Задается вручную
|
||||||
|
ida_path = r"C:\Users\user\Desktop\IDA Pro 7.7.220118 (Windows) (x86,x64,ARM64)\ida64.exe"
|
||||||
bindiff_path = r"C:\tools\BinDiff\bin\bindiff.exe"
|
bindiff_path = r"C:\tools\BinDiff\bin\bindiff.exe"
|
||||||
idb_dir = r"C:\tools\idb"
|
exe_dir = r"C:\tools\temp"
|
||||||
bindiff_exports_dir = r"C:\tools\export"
|
#
|
||||||
|
|
||||||
|
# Создание .i64 из .exe файлов
|
||||||
|
exe_list = find_exe_in_dir(exe_dir)
|
||||||
|
for path in exe_list:
|
||||||
|
make_i64(ida_path, path, path+'.i64')
|
||||||
#
|
#
|
||||||
|
|
||||||
# Создание файлов экспорта, сравнение
|
# Создание файлов экспорта, сравнение
|
||||||
start = time.perf_counter()
|
start = time.perf_counter()
|
||||||
create_exports(bindiff_path, idb_dir, bindiff_exports_dir)
|
create_exports(bindiff_path, exe_dir, exe_dir)
|
||||||
compare_exports(bindiff_path, bindiff_exports_dir)
|
compare_exports(bindiff_path, exe_dir)
|
||||||
#
|
#
|
||||||
|
|
||||||
# Подсчет времени
|
# Подсчет времени
|
||||||
|
@ -20,6 +28,14 @@ def main():
|
||||||
print(f"Elapsed: {elapsed}")
|
print(f"Elapsed: {elapsed}")
|
||||||
#
|
#
|
||||||
|
|
||||||
|
def find_exe_in_dir(directory):
|
||||||
|
exe_files = []
|
||||||
|
for root, dirs, files in os.walk(directory):
|
||||||
|
for file in files:
|
||||||
|
if file.endswith(".exe"):
|
||||||
|
exe_files.append(os.path.join(root, file))
|
||||||
|
return exe_files
|
||||||
|
|
||||||
def create_exports(bindiff_path, idb_dir, bindiff_exports_dir):
|
def create_exports(bindiff_path, idb_dir, bindiff_exports_dir):
|
||||||
cmd = f"{bindiff_path} --export {idb_dir} --output_dir {bindiff_exports_dir}"
|
cmd = f"{bindiff_path} --export {idb_dir} --output_dir {bindiff_exports_dir}"
|
||||||
print('Creating export files...', end=' ')
|
print('Creating export files...', end=' ')
|
||||||
|
|
Loading…
Reference in New Issue