mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[snippets] updated
git-svn-id: https://pykd.svn.codeplex.com/svn@65717 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
9a0d80eb23
commit
da1b7b7977
@ -44,6 +44,8 @@ def getObjectInDir( dirObj, objName ):
|
|||||||
else:
|
else:
|
||||||
dirEntry = 0
|
dirEntry = 0
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,21 +13,21 @@ def processInfo():
|
|||||||
print "".join( [chr(i) for i in process.ImageFileName if i != 0] )
|
print "".join( [chr(i) for i in process.ImageFileName if i != 0] )
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
if __name__ == "__main__":
|
|
||||||
|
|
||||||
|
|
||||||
while True:
|
|
||||||
|
|
||||||
if not isWindbgExt():
|
if not isWindbgExt():
|
||||||
if not loadDump( sys.argv[1] ):
|
if not loadDump( sys.argv[1] ):
|
||||||
dprintln( sys.argv[1] + " - load failed" )
|
dprintln( sys.argv[1] + " - load failed" )
|
||||||
break
|
return
|
||||||
|
|
||||||
if not isKernelDebugging():
|
if not isKernelDebugging():
|
||||||
dprintln( "not a kernel debugging" )
|
dprintln( "not a kernel debugging" )
|
||||||
break
|
return
|
||||||
|
|
||||||
processInfo()
|
processInfo()
|
||||||
break
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ def iat( moduleName, mask = "*" ):
|
|||||||
else:
|
else:
|
||||||
iatEntry = ptrQWord( iatAddr + i*pSize )
|
iatEntry = ptrQWord( iatAddr + i*pSize )
|
||||||
|
|
||||||
if iatEntry != 0:
|
if iatEntry != None and iatEntry != 0:
|
||||||
symbolName = findSymbol( iatEntry )
|
symbolName = findSymbol( iatEntry )
|
||||||
if fnmatch.fnmatch( symbolName, mask ):
|
if fnmatch.fnmatch( symbolName, mask ):
|
||||||
dprintln( symbolName )
|
dprintln( symbolName )
|
||||||
|
@ -73,7 +73,6 @@ def getObjectNameInfoFromInfoMask(p):
|
|||||||
# Select platform-specific function for getting name of object
|
# Select platform-specific function for getting name of object
|
||||||
getObjectNameInfo = None
|
getObjectNameInfo = None
|
||||||
try:
|
try:
|
||||||
getTypeClass("nt", "_OBJECT_HEADER").NameInfoOffset
|
|
||||||
getObjectNameInfo = getObjectNameInfoFromHeader
|
getObjectNameInfo = getObjectNameInfoFromHeader
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
getObjectNameInfo = getObjectNameInfoFromInfoMask
|
getObjectNameInfo = getObjectNameInfoFromInfoMask
|
||||||
|
Loading…
Reference in New Issue
Block a user