mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-29 11:53:23 +08:00
[pykdlib] added: module "modules" and base functionallity for it
git-svn-id: https://pykd.svn.codeplex.com/svn@62989 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
48d1d71bad
commit
bc5876cd1a
@ -5,15 +5,52 @@
|
|||||||
|
|
||||||
import pykd
|
import pykd
|
||||||
|
|
||||||
|
moduleList = []
|
||||||
|
|
||||||
|
def kernelReloadModules():
|
||||||
|
|
||||||
|
global nt
|
||||||
|
global moduleList
|
||||||
|
|
||||||
|
nt = pykd.loadModule("nt")
|
||||||
|
|
||||||
|
modules = pykd.typedVarList( nt.PsLoadedModuleList, "nt", "_LDR_DATA_TABLE_ENTRY", "InLoadOrderLinks" )
|
||||||
|
|
||||||
|
moduleList = []
|
||||||
|
|
||||||
|
moduleList.append( nt )
|
||||||
|
|
||||||
|
for m in modules:
|
||||||
|
|
||||||
|
baseName = str( pykd.loadUnicodeString( m.BaseDllName.getAddress() ) )
|
||||||
|
|
||||||
|
if baseName=="ntoskrnl.exe":
|
||||||
|
continue
|
||||||
|
|
||||||
|
module = pykd.findModule( m.DllBase )
|
||||||
|
|
||||||
|
globals()[ module.name().lower() ] = module
|
||||||
|
|
||||||
|
moduleList.append( module )
|
||||||
|
|
||||||
|
|
||||||
|
def userReloadModules():
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def printModuleList():
|
||||||
|
pykd.dprintln( "\n".join( [ str(m) for m in moduleList ] ) )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if pykd.isKernelDebugging():
|
if pykd.isKernelDebugging():
|
||||||
|
|
||||||
nt = pykd.loadModule("nt")
|
kernelReloadModules()
|
||||||
hal = pykd.loadModule("hal")
|
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
|
userReloadModules()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user