本文整理匯總了Python中winappdbg.Debug.pmf方法的典型用法代碼示例。如果您正苦於以下問題:Python Debug.pmf方法的具體用法?Python Debug.pmf怎麽用?Python Debug.pmf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類winappdbg.Debug
的用法示例。
在下文中一共展示了Debug.pmf方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Files
# 需要導入模塊: from winappdbg import Debug [as 別名]
# 或者: from winappdbg.Debug import pmf [as 別名]
program_files = r"C:\Program Files"
if os.path.exists(r"C:\Program Files (x86)"):
program_files = r"C:\Program Files (x86)"
try:
path = program_files+r"\Adobe\Reader 11.0\Reader\AcroRd32.exe"
version = versions[hashlib.md5(file(path,"rb").read()).hexdigest()] #raise if version not supported
except:
path = program_files+r"\Adobe\Reader 10.0\Reader\AcroRd32.exe"
version = versions[hashlib.md5(file(path,"rb").read()).hexdigest()] #raise if version not supported
print "Adobe Reader X %s"%version
semantics = semantics[version]
#Run the reader!
debug.execl(path)
debug.pmf = pmf
broker = Process(debug.get_debugee_pids()[0])
print "Broker PID: %d"%broker.get_pid()
# Loop while calc.exe is alive and the time limit wasn't reached.
while debug:
# Get the next debug event.
event = debug.wait()
# Dispatch the event and continue execution.
try:
debug.dispatch(event)
# add breakpoint when acrord32 gets loaded
if event.get_event_code() == 3:
process = event.get_process()
base_address = event.get_image_base()