Python wrappers for DbgEng from Windbg
Project description
Pybag
Python bindings for Microsoft DbgEng
Pybag provides helper functions on top of Python bindings for Microsoft Debug Engine to facilitate Windows native debugging.
Installation
Windows:
python setup.py install
Usage example
Use Python's repl as a command shell if desired. Ctrl-c will break-in to the debugger if you are in a wait() call.
Local user debugging
from pybag import *
def handler(bp, dbg):
print("*********** BREAK")
return DbgEng.DEBUG_STATUS_GO
dbg = UserDbg()
dbg.create("notepad.exe")
dbg.bp("Kernel32!WriteFile", handler)
dbg.go()
Remote user debugging
from pybag import *
def handler(bp, dbg):
print("*********** BREAK")
return DbgEng.DEBUG_STATUS_GO
dbg = UserDbg()
d.connect("tcp:server=192.168.1.10,port=5555")
dbg.create("notepad.exe")
dbg.bp("Kernel32!WriteFile", handler)
dbg.go()
Remote kernel debugging
from pybag import *
k = KernelDbg()
k.attach("net:port=50000,key=1.2.3.4")
Release History
- 2.2.12
- Fix #22 - comtypes issue
- 2.2.11
- Fix #18 - Fix SetImplicitProcessDataOffset
- Fix #19 - Implement CreateProcess2
- 2.2.10
- Better search for Windbg DLLs using registry and allowing user override
- 2.2.9
- Add implementations of GetCurrentThreadSystemId and GetProcessIdsByIndex
- 2.2.8
- Fixed missing files install issue
- 2.2.7
- Fixed access violation when using oneshot breakpoints
- Added 'count' option to breakpoints
- 2.2.6
- Added support for more dbgeng calls
- Symbol handling
- Set / get thread contexts
- Fixed ds command
- Added support for more dbgeng calls
- 2.2.5
- Fixed be command
- Better search for Windbg install (and DLLs)
- 2.2.4
- Fixed lint issues
- 2.2.3
- Bug fix in WriteVirtual
- 2.2.2
- Python bindings rewritten to use comtypes
- Moved to Python 3
- Support multiple debugging uses
- Local user debugging
- Remote kernel debugging
- Remote user debugging using dbgsrv
Meta
Distributed under the MIT license. See LICENSE
for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pybag-2.2.12.tar.gz
(275.9 kB
view details)
Built Distribution
Pybag-2.2.12-py3-none-any.whl
(298.1 kB
view details)
File details
Details for the file pybag-2.2.12.tar.gz
.
File metadata
- Download URL: pybag-2.2.12.tar.gz
- Upload date:
- Size: 275.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d4d17ae20ddee5d13b400166432b54d5b588f6369160a705d34101b426671f5 |
|
MD5 | f646e42f00255528f6ff968b00dc80da |
|
BLAKE2b-256 | d1465c3b6620011bfc465603b28d4b32a6fbe8c1524f0f6bc41b08f0196c544b |
File details
Details for the file Pybag-2.2.12-py3-none-any.whl
.
File metadata
- Download URL: Pybag-2.2.12-py3-none-any.whl
- Upload date:
- Size: 298.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eda5ee6c4e873902981b7f525b42a02428b87c7368df2c5bdfe1ded0e6884126 |
|
MD5 | f5a687caef09d91c8f6b54f687c82132 |
|
BLAKE2b-256 | ce7891db67e7fe1546dc8b02c38591b7732980373d2d252372f7358054031dd4 |