Batch-IDA
A python library for generate ida pro files in batch mode & compare executable files use bindiff in batch mode.
Features
- Fast generate idb/i64 files from binary files in batch mode (Multiprocess supported)
- IDA Pro Plugin Script support
- Use Bindiff for batch comparison of idb files
- Roughly read the comparison results
Requirements
- Windows / macOS / Linux / Linux (wine)
- IDA pro 7.7/8.3/9.1
- BinDiff 7/8 (Optional, used to compare executable files in batch mode)
Install
pip install --upgrade batch-ida
Usage
BI_IDA
Generate .idb/.i64 files (and run plugin) in batch mode.
from batch_ida import BI_IDA
# create a BI_IDA object with ida pro path
bi = BI_IDA('C:\Tools\IDA Pro')
# if you use wine in linux, you can set use_wine=True
# bi = BI_IDA('\home\Tools\IDA Pro', use_wine=True)
# optional
# bi.set_script(r'.\example_script.py') # run IDA script
# bi.max_subprocess = 8 # set max subprocess
bi.batch_idb_fromdir('your/binary/files/dir') # generate idb files from binary files
BI_Dircmp
Compare files in dir_a & dir_b, and move different files to dst_a & dst_b.
from batch_ida import BI_Dircmp
dir_a = r'ver_A.rom/squashfs-root/usr/lib/'
dir_b = r'ver_B.rom/squashfs-root/usr/lib/'
dst_a = r'compare/ver_A'
dst_b = r'compare/ver_B'
bid = BI_Dircmp(dir_a, dir_b, dst_a, dst_b)
bid.cmp()
BI_Bindiff
Generate .idb and .bindiff files in batch mode. (Windows only)
from batch_ida import BI_Bindiff
bib = BI_Bindiff()
# Set ida pro and bindiff path
bib.set_ida_path('C:\Tools\IDA Pro')
bib.set_bindiff_path('C:\Program Files\BinDiff')
dst_a = r'compare/ver_A'
dst_b = r'compare/ver_B'
# dst_a and dst_b are the directories where the binary files to be compared are located
output = bib.batch_bindiff(dst_a, dst_b)
# output is a directory containing bindiff files(sqlite3)
BI_Analyzer
Analyze Bindiff files (sqlite3 file format) in batch mode and print the results.
from batch_ida import BI_Analyzer
bia = BI_Analyzer(r'path\to\output_dir')
bia.print_base_info()
# let's print the diff files with similarity < 0.95 and != 0.0
print("%s\t%s\t%s\t%s\t%s\t%s" % ("SIM", "CONF", "TOTAL", "FUNC", "LIBFUNC", "NAME"))
info_list = bia.get_info_list()
for i in info_list:
if i['total_func'] & i['func_dif'] & i['libfunc_dif']:
print("%.02f\t%.2f\t%d\t%d\t%d\t%s" % (i['similarity'], i['confidence'], i['total_func'], i['func_dif'], i[
"libfunc_dif"], i['name']))
elif i['similarity'] < 0.95 and i['similarity'] != 0.0:
print("%.02f\t%.2f\t%d\t%d\t%d\t%s" % (i['similarity'], i['confidence'], i['total_func'], i['func_dif'], i[
"libfunc_dif"], i['name']))
Metadata
Release files for batch-ida 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| batch_ida-0.1.7.tar.gz | 7.3 kB | Without provenance | Details for batch_ida-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| batch_ida-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for batch_ida-0.1.7-py3-none-any.whl |
Total release size: 16.6 kB
Release files / batch_ida-0.1.7.tar.gz
| Download URL | batch_ida-0.1.7.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6f04ee78c176b997d5d8ba0432f9f8cc1a075abc830d7bacd19e11cf8d147cb
|
|
BLAKE2b-256 checksum How to use checksums |
8d42152ebb35cee14313d17ddca614ba1037c5df93290f674ed56b191c846586
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.8 Windows/10
|
Release files / batch_ida-0.1.7-py3-none-any.whl
| Download URL | batch_ida-0.1.7-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9517b867c84a3e3e5b4f6b3f217b092d6c1bb42dd759568546007c6c789d3a5e
|
|
BLAKE2b-256 checksum How to use checksums |
f432326095b457d3a3f7a23a3a55b44aedc64713dbdf015174680e10d314026d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.8 Windows/10
|
Security for batch-ida 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.