mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-4384: Upgrade to pybag-2.2.10
This commit is contained in:
parent
4e89a2ec6d
commit
87aecb85f9
3 changed files with 2 additions and 37 deletions
|
@ -18,7 +18,7 @@ classifiers = [
|
|||
]
|
||||
dependencies = [
|
||||
"ghidratrace==10.4",
|
||||
"pybag>=2.2.9"
|
||||
"pybag>=2.2.10"
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
|
|
|
@ -24,41 +24,6 @@ from ghidradbg import dbgmodel
|
|||
|
||||
ctypes.windll.kernel32.SetErrorMode(0x0001 | 0x0002 | 0x8000)
|
||||
|
||||
if platform.architecture()[0] == '64bit':
|
||||
dbgdirs = [os.getenv('OPT_DBGMODEL_PATH'),
|
||||
r'C:\Program Files\Windows Kits\10\Debuggers\x64',
|
||||
r'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64']
|
||||
else:
|
||||
dbgdirs = [os.getenv('OPT_DBGMODEL_PATH'),
|
||||
r'C:\Program Files\Windows Kits\10\Debuggers\x86',
|
||||
r'C:\Program Files (x86)\Windows Kits\10\Debuggers\x86']
|
||||
dbgdir = None
|
||||
for _dir in dbgdirs:
|
||||
if _dir is not None and os.path.exists(_dir):
|
||||
dbgdir = _dir
|
||||
break
|
||||
|
||||
if not dbgdir:
|
||||
raise RuntimeError("Windbg install directory not found!")
|
||||
|
||||
print(f"Loading dbgeng and friends from {dbgdir}")
|
||||
|
||||
# preload these to get correct DLLs loaded
|
||||
try:
|
||||
ctypes.windll.LoadLibrary(os.path.join(dbgdir, 'dbghelp.dll'))
|
||||
except Exception as exc:
|
||||
print(f"LoadLibrary failed: {dbgdir}\dbghelp.dll {exc}")
|
||||
pass
|
||||
try:
|
||||
ctypes.windll.LoadLibrary(os.path.join(dbgdir, 'dbgeng.dll'))
|
||||
except Exception as exc:
|
||||
print(f"LoadLibrary failed: {dbgdir}\dbgeng.dll {exc}")
|
||||
pass
|
||||
try:
|
||||
ctypes.windll.LoadLibrary(os.path.join(dbgdir, 'DbgModel.dll'))
|
||||
except Exception as exc:
|
||||
print(f"LoadLibrary failed: {dbgdir}\dbgmodel.dll {exc}")
|
||||
pass
|
||||
|
||||
try:
|
||||
from comtypes.gen import DbgMod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue