mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +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
|
@ -15,7 +15,7 @@
|
||||||
::@env OPT_TARGET_IMG:str="" "Image" "The target binary executable image"
|
::@env OPT_TARGET_IMG:str="" "Image" "The target binary executable image"
|
||||||
::@env OPT_TARGET_ARGS:str="" "Arguments" "Command-line arguments to pass to the target"
|
::@env OPT_TARGET_ARGS:str="" "Arguments" "Command-line arguments to pass to the target"
|
||||||
::@env OPT_USE_DBGMODEL:bool=true "Use dbgmodel" "Load and use dbgmodel.dll if it is available."
|
::@env OPT_USE_DBGMODEL:bool=true "Use dbgmodel" "Load and use dbgmodel.dll if it is available."
|
||||||
::@env OPT_DBGMODEL_PATH:str="" "Path to dbgeng" "Path to dbgeng and associated DLLS (if not Windows Kits)."
|
::@env WINDBG_DIR:str="" "Path to dbgeng" "Path to dbgeng and associated DLLS (if not Windows Kits)."
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ classifiers = [
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ghidratrace==10.4",
|
"ghidratrace==10.4",
|
||||||
"pybag>=2.2.9"
|
"pybag>=2.2.10"
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
|
|
|
@ -24,41 +24,6 @@ from ghidradbg import dbgmodel
|
||||||
|
|
||||||
ctypes.windll.kernel32.SetErrorMode(0x0001 | 0x0002 | 0x8000)
|
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:
|
try:
|
||||||
from comtypes.gen import DbgMod
|
from comtypes.gen import DbgMod
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue