Intercept assembly instructions before they get executed. Args: callback : a method to call upon interception user_data : an additional context to pass to callback (default: `None`) begin : start of memory range to watch end : end o
(self, callback: TraceHookCalback, user_data: Any = None, begin: int = 1, end: int = 0)
| 398 | return HookRet(self, hook_type, hook) |
| 399 | |
| 400 | def hook_code(self, callback: TraceHookCalback, user_data: Any = None, begin: int = 1, end: int = 0) -> HookRet: |
| 401 | """Intercept assembly instructions before they get executed. |
| 402 | |
| 403 | Args: |
| 404 | callback : a method to call upon interception |
| 405 | user_data : an additional context to pass to callback (default: `None`) |
| 406 | begin : start of memory range to watch |
| 407 | end : end of memory range to watch |
| 408 | |
| 409 | Notes: |
| 410 | If `begin` and `end` are not specified, the entire memory space will be watched. |
| 411 | |
| 412 | Returns: |
| 413 | Hook handle |
| 414 | """ |
| 415 | |
| 416 | return self.ql_hook(UC_HOOK_CODE, callback, user_data, begin, end) |
| 417 | |
| 418 | # TODO: remove; this is a special case of hook_intno(-1) |
| 419 | def hook_intr(self, callback, user_data=None, begin=1, end=0): |