mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 21:03:23 +08:00

[+] added: !py windbg command uses $pythonpath var for search scripts git-svn-id: https://pykd.svn.codeplex.com/svn@56329 9b283d60-5439-405e-af05-b73fd8c4d996
33 lines
637 B
Python
33 lines
637 B
Python
|
|
import sys
|
|
from pykd import *
|
|
|
|
|
|
def loadSymbols():
|
|
|
|
global nt
|
|
nt = loadModule( "nt" )
|
|
nt.PsActiveProcessHead = getOffset( "nt", "PsActiveProcessHead" )
|
|
|
|
|
|
def processInfo():
|
|
|
|
processList = typedVarList( nt.PsActiveProcessHead, "nt", "_EPROCESS", "ActiveProcessLinks" )
|
|
|
|
for process in processList:
|
|
dprintln( "".join( [ chr(i) for i in process.ImageFileName.values() ] ) )
|
|
|
|
return
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if not isSessionStart():
|
|
createSession()
|
|
loadDump( sys.argv[1] )
|
|
dprintln( sys.argv[1] + " - loaded OK" )
|
|
|
|
loadSymbols()
|
|
|
|
processInfo()
|