mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
24 lines
572 B
Python
24 lines
572 B
Python
#
|
|
# Print content of object table (handle table)
|
|
#
|
|
|
|
from pykd import *
|
|
import ntobj
|
|
import sys
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if not isSessionStart():
|
|
print "Script is launch out of WinDBG"
|
|
quit(0)
|
|
|
|
if (2 != len(sys.argv)):
|
|
dprintln("Invalid command line")
|
|
dprintln("Usage: " + sys.argv[0] + " <ObjectTableAddr>")
|
|
else:
|
|
lstObejcts = ntobj.getListByHandleTable(int(sys.argv[1], 16))
|
|
dprintln("%u objects:" % len(lstObejcts))
|
|
for obj in lstObejcts:
|
|
dprintln("obj: %X" % obj + ", type:%X" % ntobj.getType(obj))
|