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


Python Process.iter_modules方法代码示例

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


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

示例1: print_threads_and_modules

# 需要导入模块: from winappdbg import Process [as 别名]
# 或者: from winappdbg.Process import iter_modules [as 别名]
def print_threads_and_modules( pid ):
    # Instance a Process object.
  process = Process( pid )
  print "Process %d" % process.get_pid()
    # Now we can enumerate the threads in the process...
  print "Threads:"
  for thread in process.iter_threads():
    print "\t%d" % thread.get_tid()
    # ...and the modules in the process.
  print "Modules:"
  bits = process.get_bits()
  for module in process.iter_modules():
    print "\t%s\t%s" % (
       HexDump.address( module.get_base(), bits ), module.get_filename()
    )
开发者ID:vkremez,项目名称:WinAPI-Debugger,代码行数:17,代码来源:EnumerateThreadsDLLModulesInProcess.py

示例2: print_threads_and_modules

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

    # Instance a Process object.
    process = Process( pid )
    print "Process %d" % process.get_pid()

    # Now we can enumerate the threads in the process...
    print "Threads:"
    for thread in process.iter_threads():
        print "\t%d" % thread.get_tid()

    # ...and the modules in the process.
    print "Modules:"
    bits = process.get_bits()
    for module in process.iter_modules():
        print "\thas module: %s\t%s" % (
            HexDump.address( module.get_base(), bits ),
            module.get_filename()
        )

    print "Breakpoints:"
    for i in debug.get_all_breakpoints():
        bp = i[2]
        print "breakpoint: %s %x" % (bp.get_state_name(), bp.get_address())
开发者ID:nitram2342,项目名称:spooky-hook,代码行数:26,代码来源:spooky-hook.py


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