No project description provided
Project description
Batch-IDA
A python library for comparing folders and generate ida and bindiff files in batch mode.
Purpose
- Batch generation of idb files from binary files
- Use bindiff to batch compare idb files
- Roughly read the comparison results
Notice
- IDA pro 7 and Bindiff 7 requires pre-installation. (Only tested on IDA pro 7.7 and bindiff 7)
Install
pip install --upgrade batch-ida
Usage
BI_Dircmp
Compare files in dirA & dirB, and move different files to dst_a & dst_b.
# 1. BI_Dircmp比较原文件夹,并复制哈希不同的文件到目标文件夹
from batch_ida import BI_Dircmp
# 原始文件夹dirA,dirB,包含需要比较的二进制
dirA = r'\\wsl.localhost\Ubuntu-22.04\home\zzh\fw_project/d9_idrac/_5.00.10.20.d9.extracted/squashfs-root/usr/lib/'
dirB = r'\\wsl.localhost\Ubuntu-22.04\home\zzh\fw_project/d9_idrac/_5.00.20.00.d9.extracted/squashfs-root/usr/lib/'
# 目标文件夹dstA,dstB,用来存放哈希值不同的二进制,是空文件夹
dst_a = r'C:\Users\zzhihan\Desktop\36347\1020'
dst_b = r'C:\Users\zzhihan\Desktop\36347\2000'
# 使用Dircmp比较两个文件夹中文件的差异,并将哈希不同的文件复制到目标文件夹
bid = BI_Dircmp(dirA, dirB, dst_a, dst_b)
bid.cmp()
BI_Bindiff
Generate .ida and .bindiff files in batch mode.
# 使用Bindiff批量分析二进制文件
from batch_ida import BI_Bindiff
bib = BI_Bindiff()
# 设置ida和bindiff路径
bib.set_ida_path('C:\Tools\IDA Pro')
bib.set_bindiff_path('C:\Program Files\BinDiff')
bib.max_subprocess = 16
# 开始比较,结果输出到output文件夹,批量生成idb比较慢
output = bib.batch_bindiff(dst_a, dst_b)
BI_Analyzer
Analyze Bindiff files (sqlite3 file format) in batch mode and print the results.
# 使用Analyzer批量读输出的Bindiff文件,其实就是sqlite3数据库文件
from batch_ida import BI_Analyzer
bia = BI_Analyzer(r'C:\Users\zzhihan\Desktop\test\4_4010_vs_4_4040')
bia.print_base_info()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
batch_ida-0.1.2.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for batch_ida-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcc93de79ed245fb6b7289011159ae416400d6b0cedc6268816e5684821ec652 |
|
MD5 | dba5783685501b1b7e536c71dc71309a |
|
BLAKE2b-256 | e7eb2ff2d2b05c1c53c95d2b884d7a8cfcb8264be8a0408589ee5020077ac24c |