Mixaill / FakePDB

Tool for PDB generation from IDA Pro database
Apache License 2.0
550 stars 61 forks source link

Possible way around for 7.4+ versions #29

Open dezmen3 opened 2 years ago

dezmen3 commented 2 years ago

Played around with different versions of fakepdb and could finally make an .pdb file. I'm using IDA PRO 7.7

Steps:

  1. Use fakepdb 0.3 to dump info into json file (might work with 0.2 dump, haven't tested)
  2. Get fakepdb 0.2 and copy .json file and original exe file into fakepdb/win32/ folder or just take pdbgen.exe and place somewhere with those files
  3. run cmd.exe-> pdbgen.exe generate -l "path to your app\app.exe" "path to json file\app.json" "path to .pdb file that will saved"

worked like a charm, got pdb,VS recognized functions

widberg commented 1 year ago

This works for me, thanks! Not sure what happened between 0.2 and 0.3 but using the older version I was able to get a PDB where the newer one would only produce a JSON. Having the same problem on the latest commit too.

p0358 commented 1 year ago

I present to you the actual solution:

In IDA scripting window:

import ida_nalt
ida_nalt.set_root_filename('E:\\new\\path\\to\\your\\analysedfile.dll')

You may also check current path with:

ida_nalt.get_input_file_path()

This is the difference between 0.2 and 0.3, currently FakePDB uses ida_nalt.get_input_file_path(). Previously it assumed the old path to be <ida_db_path>/<ida_db_name>.exe. That assumption was of course very wrong, since you could have a different extension than exe, or even save the database elsewhere in the first place!

But the current behavior causes things to break if you move the executable somewhere else, while IDA still thinks it's at the old location. After changing it, it works again.