Open jpsnyder opened 1 year ago
Everything you are mentioning makes sense to me. The 2nd point you mention is problematic, but I believe I can do something to make it easier too.
I'm doing some heavy changes for Diaphora 3.0 (see #193), I will add these tasks.
Sounds good. Glad you can incorporate some of these suggestions. I think with some strategic tweaks, diaphora can be a powerful library for users.
If you are curious, I'm using diaphora for batch diffing files. So being able to programmatically call diaphora is key.
I use the following ida script to export the database and then diff the databases created locally using CBinDiff
and the reimplemented similarity calcuation.
"""
IDA script used to process a file and generate its SQLite database.
"""
import os
def main():
import idc
from autodiff.vendor.diaphora import diaphora_ida
os.environ["DIAPHORA_AUTO"] = "1"
os.environ["DIAPHORA_USE_DECOMPILER"] = "1"
os.environ["DIAPHORA_EXPORT_FILE"] = idc.ARGV[1]
diaphora_ida.main()
if __name__ == "__main__":
main()
(It would also be nice to have an export()
function that took parameters to do this programatically, instead of my hacky method here.)
When trying to use diaphora as a library for my own tool, I discovered a few things that could be improved: (Note: I haven't pulled some of your latest changes yet, so some of this might be fixed already.)
pip install ida_plugin --target=%IDA_INSTALL_DIR%\python\3
if it is pip installable. Plus this would help me not have to vendor diaphora in my own code.Obviously, I'm not really using diaphora as it was initially designed, and I may not be the target audience, but it would be nice if diaphora was more Python API friendly.