joxeankoret / diaphora

Diaphora, the most advanced Free and Open Source program diffing tool.
http://diaphora.re
GNU Affero General Public License v3.0
3.62k stars 373 forks source link

Decompiler mandatory #263

Closed rc-94 closed 1 year ago

rc-94 commented 1 year ago

Hi,

I had a trouble when using the new Diaphora 3. I don't have the Hex-Ray decompiler and when I try to export a binary to a sqlite database, IDA showed me an error message saying the decompiler is not loaded. I changed the configuration python file by switching exporting_use_decompiler to False and the problem is still here.

Actually, I think there is a mistake in the diaphora_ida.py file, at line 1040, in the initialization of the class CIDABinDiff, the attribute self.decompiler_available should be set to False. Just to let you know. I modified it and it works fine.

joxeankoret commented 1 year ago

Hi!

Does it fail in your case or it just complains? In any case, I'm going to change the line you mention and run the testing suite.

Thanks!

rc-94 commented 1 year ago

It fails and makes IDA crash

joxeankoret commented 1 year ago

Woah... that's pretty different and I haven't seen it ever, so it smells like an IDA internal bug. Can you please give me more information like Operating System, IDA version, Python version, etc... Also (if you are able to do so) have you contacted Hex-Rays?

rc-94 commented 1 year ago

Sure :

Actually, I don't plan to contact Hex-Rays since I've found a way to make Diaphora3 work

joxeankoret commented 1 year ago

I cannot reproduce, I'm afraid. However, it can be properly fixed by changing the line you mention with this patch:

self.decompiler_available = config.EXPORTING_USE_DECOMPILER

Since version 3.0 Diaphora uses a configuration file for almost anything, and after applying this patch, changing the value of EXPORTING_USE_DECOMPILER in diaphora_config.py should fix your issue.

joxeankoret commented 1 year ago

Should be fixed with the latest commit. Feel free to reopen if it happens again.