當前位置: 首頁>>代碼示例>>Python>>正文


Python addrspace.ASAssertionError方法代碼示例

本文整理匯總了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 
開發者ID:virtualrealitysystems,項目名稱:aumfor,代碼行數:19,代碼來源:windows.py

示例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 
開發者ID:virtualrealitysystems,項目名稱:aumfor,代碼行數:31,代碼來源:utils.py


注:本文中的volatility.addrspace.ASAssertionError方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。