07月26, 2018

creat sqlite use ida

Diaphora needs sqlite file, but we only have bin file right now, so we need to creat sqlite file from bin file first.

$ export DIAPHORA_AUTO=1

$ export DIAPHORA_EXPORT_FILE=/path/to/your/new.sqlite

$ export DIAPHORA_USE_DECOMPILER=1 # optionally, use the decompiler

$ idaq -A -B -Sdiaphora.py 0.bin 1.bin

you need to pass the full path to diaphora.py instead of just using a relative path, something like:

$ ida64 -A -B -S/path/to/diaphora.py 0.bin
$ ida64 -A -B -S/path/to/diaphora.py 1.bin

running ida twice, one for each binary!

idaq64 -A -B -S/home/harry/ida-6.95/plugins/diaphora.py 1.bin

-> 1.sqlite

idaq64 -A -B -S/home/harry/ida-6.95/plugins/diaphora.py 0.bin

-> 0.sqlite

python diaphora.py O0.sqlite O1.sqlite -o diffs.diaphora

It will generate a database called diffs.diaphora with all the matches found and the ratios given to each match

本文链接:https://harry.ren/post/creat-sqlite-ida.html

-- EOF --

Comments