pykd/samples/km/proclist.py
SND\kernelnet_cp 967dee7c12 [0.3.x] branch : km/samples
git-svn-id: https://pykd.svn.codeplex.com/svn@85158 9b283d60-5439-405e-af05-b73fd8c4d996
2017-11-03 14:36:26 +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()