我尝试在 ida7.0 中的 0x403E65 处挂钩断点,但不幸的是,它永远不会到达方法DbgHook.dbg_bpt
,所以我的挂钩是无用的。参考这个demo,我真的不明白怎么回事。
ida_script.py。
from idaapi import *
chunks = {}
class DbgHook(DBG_Hooks):
def dbg_bpt(self, tid, ea):
global chunks
print "test"
chunks[GetRegValue("eax")] = GetRegValue("ebx")
continue_process()
return 0
try:
if debugger:
debugger.unhook()
except Exception as e:
pass
AddBpt(0x403E65)
debugger = DBG_Hooks()
debugger.hook()
request_start_process("C:\\Users\\win7\\Desktop\\codemap.exe", "", "")
run_requests()