You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
Getting results are tightly coupled with sqlite databases, which requires me to let diaphora write out the diff results to the database, only to then immediately open up the database and read the results for my own usage. It would be nice if pulling diff results can be exposed as functions before writing out results.
For example, I had to reimplement the similarity calculation in my own code since the result is only printed out and not returned.
While I understand that this is a IDA only tool, it would be nice if diaphora was setup as a package to make it pip installable and discoverable on PyPi. I've found it easy enough to quickly install a IDA plugin with 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.
The text was updated successfully, but these errors were encountered:
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."""importosdefmain():
importidcfromautodiff.vendor.diaphoraimportdiaphora_idaos.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.
The text was updated successfully, but these errors were encountered: