Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # need to hunt for this pydbg lib
- # didn't see it in macports, or brew
- from pydbg import *
- def handler_breakpoint(pydbg):
- print '===================Dumping context'
- print pydbg.dump_context()
- return DBG_CONTINUE
- dbg = pydbg()
- # register breakpoint handler function
- dbg.set_callback(EXCEPTION_BREAKPOINT, handler_breakpoint)
- dbg.attach(int(sys.argv[1]))
- dbg.bp_set(int(sys.argv[2], 16),"", 1)
- dbg.debug_event_loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement