当前位置: 首页>>代码示例>>Python>>正文


Python Process.search_hexa方法代码示例

本文整理汇总了Python中winappdbg.Process.search_hexa方法的典型用法代码示例。如果您正苦于以下问题:Python Process.search_hexa方法的具体用法?Python Process.search_hexa怎么用?Python Process.search_hexa使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在winappdbg.Process的用法示例。


在下文中一共展示了Process.search_hexa方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: wildcard_search

# 需要导入模块: from winappdbg import Process [as 别名]
# 或者: from winappdbg.Process import search_hexa [as 别名]
def wildcard_search( pid, pattern ):

    #
    # Hex patterns must be in this form:
    #     "68 65 6c 6c 6f 20 77 6f 72 6c 64"  # "hello world"
    #
    # Spaces are optional. Capitalization of hex digits doesn't matter.
    # This is exactly equivalent to the previous example:
    #     "68656C6C6F20776F726C64"            # "hello world"
    #
    # Wildcards are allowed, in the form of a "?" sign in any hex digit:
    #     "5? 5? c3"          # pop register / pop register / ret
    #     "b8 ?? ?? ?? ??"    # mov eax, immediate value
    #

    # Instance a Process object.
    process = Process( pid )

    # Search for the hexadecimal pattern in the process memory.
    for address, data in process.search_hexa( pattern ):

        # Print a hex dump for each memory location found.
        print HexDump.hexblock(data, address = address)
开发者ID:MarioVilas,项目名称:winappdbg,代码行数:25,代码来源:12_wildcard_search.py


注:本文中的winappdbg.Process.search_hexa方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。