pykd/samples/km/proclist.py
SND\kernelnet_cp f9276a7dd7 [0.2.x] fixed : KM samples
git-svn-id: https://pykd.svn.codeplex.com/svn@81318 9b283d60-5439-405e-af05-b73fd8c4d996
2017-11-08 17:42:50 +04:00

31 lines
638 B
Python

import sys
from pykd import *
def processInfo():
nt = module( "nt" )
processList = typedVarList( nt.PsActiveProcessHead, "nt!_EPROCESS", "ActiveProcessLinks" )
for process in processList:
print "".join( [chr(i) for i in process.ImageFileName if i != 0] )
def run():
if not isWindbgExt():
if not loadDump( sys.argv[1] ):
dprintln( sys.argv[1] + " - load failed" )
return
if not isKernelDebugging():
dprintln( "not a kernel debugging" )
return
processInfo()
if __name__ == "__main__":
run()