binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Default database name should include file extension too

Open op2786 opened this issue 3 years ago • 2 comments

Some applications have a DLL which named same as it's main executable. Let's say I've a two file named a.exe and a.dll respectively. When I analyze a.exe and save a database for it, BN saves a database named a.bndb. Then when I try to open a.dll for analysis, BN asks me if I want to load database from disk for obvious reasons. I think this behaviour is prone to some annoying results.

op2786 avatar Jul 21 '22 15:07 op2786

This also affects Existing Database Detection, too. If you have a.exe and a.bndb and go to open a.dll, it will (by default) prompt you to open a.bndb, which is not what you want. So, this is a really good suggestion. We just need to make sure that, when we make this change, we also change the Existing Database Detection codepath to match.

There also may be some backwards-compatibility concerns here, but I can't think of any off the top of my head that are show-stoppers. If anyone else can, please toss that in here, too.

fuzyll avatar Jul 21 '22 15:07 fuzyll

fwiw, this is not entirely accurate: the Existing Database Detection looks for basename.ext.bndb as well as basename.bndb, though it does prefer basename.bndb first.

Note that if they both exist, it will ask about both of them if the user clicks No on the first prompt.

galenbwill avatar Jul 21 '22 16:07 galenbwill

Fixed in 3.5.4373-dev

negasora avatar Jul 06 '23 17:07 negasora