From 0243cc7cd29ecb755e121d57fa3c3117ceb56b44 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Thu, 31 May 2012 13:11:27 +0000 Subject: [PATCH] [0.1.x] fixed : snippet ntobj.py git-svn-id: https://pykd.svn.codeplex.com/svn@76848 9b283d60-5439-405e-af05-b73fd8c4d996 --- snippets/ntobj.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/snippets/ntobj.py b/snippets/ntobj.py index 98d0e49..48be94f 100644 --- a/snippets/ntobj.py +++ b/snippets/ntobj.py @@ -34,8 +34,7 @@ def getTypeWin7(p): Implementation for Win7+ """ objHeader = nt.containingRecord(p, "_OBJECT_HEADER", "Body") - tableTypeIndex = getOffset("nt", "ObTypeIndexTable") - return ptrPtr(tableTypeIndex + (ptrSize() * objHeader.TypeIndex)) + return ptrPtr( nt.ObTypeIndexTable + (ptrSize() * objHeader.TypeIndex)) def getTypeLegacy(p): """ @@ -71,7 +70,7 @@ def getObjectNameInfoFromInfoMask(p): objHeader = nt.containingRecord(p, "_OBJECT_HEADER", "Body") if (0 == (objHeader.InfoMask & 2)): return None - offsetNameInfo = ptrByte( getOffset("nt", "ObpInfoMaskToOffset") + (objHeader.InfoMask & 3) ) + offsetNameInfo = ptrByte( nt.ObpInfoMaskToOffset + (objHeader.InfoMask & 3) ) if (0 == offsetNameInfo): return None return nt.typedVar("_OBJECT_HEADER_NAME_INFO", objHeader.getAddress() - offsetNameInfo)