This repository was archived by the owner on Jul 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
This repository was archived by the owner on Jul 8, 2025. It is now read-only.
opening IDA 7.6 idb #103
Copy link
Copy link
Closed
Description
Hi,
I have an UnicodeDecodeError when opening IDA 7.6 idb.
Probably the internal structure has changed?
Thanks,
Takahiro
In [3]: with idb.from_file("efi_modules/CpuDxe.efi.i64") as db:
...: api = idb.IDAPython(db)
...:
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-3-f5d91a681500> in <module>
----> 1 with idb.from_file("efi_modules/CpuDxe.efi.i64") as db:
2 api = idb.IDAPython(db)
3
c:\python39-x64\lib\contextlib.py in __enter__(self)
115 del self.args, self.kwds, self.func
116 try:
--> 117 return next(self.gen)
118 except StopIteration:
119 raise RuntimeError("generator didn't yield") from None
c:\python39-x64\lib\site-packages\idb\__init__.py in from_file(path)
31 buf = memview(f.read())
32 db = idb.fileformat.IDB(buf)
---> 33 db.vsParse(buf)
34 yield db
35
c:\python39-x64\lib\site-packages\vstruct\__init__.py in vsParse(self, sbytes, offset, fast)
143 raise struct.error("Failed to parse field `{:s}.{:s}` at offset {:s}".format(
144 self.__class__.__name__, fname, hex(offset)))
--> 145 self._vsFireCallbacks(fname)
146 return offset
147
c:\python39-x64\lib\site-packages\vstruct\__init__.py in _vsFireCallbacks(self, fname)
86 callback = getattr(self, 'pcb_%s' % fname, None)
87 if callback != None:
---> 88 callback()
89 cblist = self._vs_pcallbacks.get(fname)
90 if cblist != None:
c:\python39-x64\lib\site-packages\idb\fileformat.py in pcb_header(self)
1197 s.vsParse(section.contents)
1198 if isinstance(s, TIL):
-> 1199 s.inf = Root(self).idainfo
1200 # vivisect doesn't allow you to assign vstructs to
1201 # attributes that are not part of the struct,
c:\python39-x64\lib\site-packages\idb\analysis.py in __getattr__(self, key)
363 return bytes(v)
364 else:
--> 365 return field.cast(bytes(v), wordsize=self.idb.wordsize)
366
367 def get_field_tag(self, name):
c:\python39-x64\lib\site-packages\idb\analysis.py in inner(buf, wordsize)
94
95 def inner(buf, wordsize=None):
---> 96 return cast(buf, V, wordsize=wordsize)
97
98 setattr(inner, "V", V.__name__)
c:\python39-x64\lib\site-packages\idb\analysis.py in cast(buf, V, wordsize)
72 """
73 v = V(wordsize=wordsize)
---> 74 v.vsParse(buf)
75 return v
76
c:\python39-x64\lib\site-packages\idb\analysis.py in vsParse(self, sbytes, offset, fast)
634 self.procname = reader.str(8)
635 elif self.version >= 700:
--> 636 self.procname = reader.str(16)
637 import re
638
c:\python39-x64\lib\site-packages\idb\analysis.py in str(self, size, encoding)
425
426 def str(self, size, encoding="utf-8"):
--> 427 return self.read(size).decode(encoding)
428
429 def u16(self, big=False):
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8a in position 8: invalid start byte