本文整理匯總了Python中volatility.addrspace.ASAssertionError方法的典型用法代碼示例。如果您正苦於以下問題:Python addrspace.ASAssertionError方法的具體用法?Python addrspace.ASAssertionError怎麽用?Python addrspace.ASAssertionError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類volatility.addrspace
的用法示例。
在下文中一共展示了addrspace.ASAssertionError方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: generate_suggestions
# 需要導入模塊: from volatility import addrspace [as 別名]
# 或者: from volatility.addrspace import ASAssertionError [as 別名]
def generate_suggestions(self):
"""Generates a single response of True or False depending on whether the space is a valid Windows AS"""
# This constraint looks for self referential values within
# the paging tables
try:
if self.obj_vm.pae:
pde_base = 0xc0600000
pd = self.obj_vm.get_pdpi(0) & 0xffffffffff000
else:
pde_base = 0xc0300000
pd = self.obj_vm.dtb
if (self.obj_vm.vtop(pde_base) == pd):
yield True
raise StopIteration
except addrspace.ASAssertionError, _e:
pass
示例2: load_as
# 需要導入模塊: from volatility import addrspace [as 別名]
# 或者: from volatility.addrspace import ASAssertionError [as 別名]
def load_as(config, astype = 'virtual', **kwargs):
"""Loads an address space by stacking valid ASes on top of each other (priority order first)"""
base_as = None
error = exceptions.AddrSpaceError()
# Start off requiring another round
found = True
## A full iteration through all the classes without anyone
## selecting us means we are done:
while found:
debug.debug("Voting round")
found = False
for cls in sorted(registry.get_plugin_classes(addrspace.BaseAddressSpace).values(),
key = lambda x: x.order if hasattr(x, 'order') else 10):
debug.debug("Trying {0} ".format(cls))
try:
base_as = cls(base_as, config, astype = astype, **kwargs)
debug.debug("Succeeded instantiating {0}".format(base_as))
found = True
break
except addrspace.ASAssertionError, e:
debug.debug("Failed instantiating {0}: {1}".format(cls.__name__, e), 2)
error.append_reason(cls.__name__, e)
continue
except Exception, e:
debug.debug("Failed instantiating (exception): {0}".format(e))
error.append_reason(cls.__name__ + " - EXCEPTION", e)
continue