python-idb icon indicating copy to clipboard operation
python-idb copied to clipboard

Ida 7.7 UnicodeDecodeError:

Open USSRcoder opened this issue 8 months ago • 3 comments

UnicodeDecodeError:

C:\Users\adm\Downloads\f4>python C:\games\IDA7.7\python-idb\scripts\dump_btree.py FO4GSNoSND.exe_deb2.i64
INFO:idb.netnode:resolved string netnode Root Node to ff00000000000002
INFO:idb.netnode:resolved string netnode Root Node to ff00000000000002
Traceback (most recent call last):
  File "C:\games\IDA7.7\python-idb\scripts\dump_btree.py", line 72, in <module>
    sys.exit(main())
  File "C:\games\IDA7.7\python-idb\scripts\dump_btree.py", line 40, in main
    with idb.from_file(args.idbpath) as db:
  File "contextlib.py", line 113, in __enter__
  File "c:\old\python38\lib\site-packages\idb\__init__.py", line 33, in from_file
    db.vsParse(buf)
  File "c:\old\python38\lib\site-packages\vstruct\__init__.py", line 145, in vsParse
    self._vsFireCallbacks(fname)
  File "c:\old\python38\lib\site-packages\vstruct\__init__.py", line 88, in _vsFireCallbacks
    callback()
  File "c:\old\python38\lib\site-packages\idb\fileformat.py", line 1199, in pcb_header
    s.inf = Root(self).idainfo
  File "c:\old\python38\lib\site-packages\idb\analysis.py", line 365, in __getattr__
    return field.cast(bytes(v), wordsize=self.idb.wordsize)
  File "c:\old\python38\lib\site-packages\idb\analysis.py", line 96, in inner
    return cast(buf, V, wordsize=wordsize)
  File "c:\old\python38\lib\site-packages\idb\analysis.py", line 74, in cast
    v.vsParse(buf)
  File "c:\old\python38\lib\site-packages\idb\analysis.py", line 636, in vsParse
    self.procname = reader.str(16)
  File "c:\old\python38\lib\site-packages\idb\analysis.py", line 427, in str
    return self.read(size).decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 8: invalid start byte

similar this: https://github.com/williballenthin/python-idb/issues/103#issue-849054031

sorry, I can't share any database from my computer because any new database contains pieces from previous working databases. That's why I took this utility to check what these pieces are.

USSRcoder avatar May 05 '25 15:05 USSRcoder