From 5b1f7dfb69092c92b56e1102b5e73013c5754c19 Mon Sep 17 00:00:00 2001 From: elicn Date: Sun, 18 Sep 2022 17:59:00 +0300 Subject: [PATCH] Final touches --- bindings/python/unicorn/__init__.py | 4 +++- bindings/python/unicorn/unicorn.py | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bindings/python/unicorn/__init__.py b/bindings/python/unicorn/__init__.py index a9adbc67..4e0c8ba9 100644 --- a/bindings/python/unicorn/__init__.py +++ b/bindings/python/unicorn/__init__.py @@ -1,4 +1,6 @@ -# Unicorn Python bindings, by Nguyen Anh Quynnh +# New and improved Unicorn Python bindings by elicn +# based on Nguyen Anh Quynnh's work + from . import arm_const, arm64_const, mips_const, sparc_const, m68k_const, x86_const from .unicorn_const import * from .unicorn import Uc, ucsubclass, uc_version, uc_arch_supported, version_bind, debug, UcError, __version__ diff --git a/bindings/python/unicorn/unicorn.py b/bindings/python/unicorn/unicorn.py index 9e911e8a..9dc308b3 100644 --- a/bindings/python/unicorn/unicorn.py +++ b/bindings/python/unicorn/unicorn.py @@ -862,13 +862,13 @@ class Uc(RegStateManager): def __hook_tcg_opcode(): @uccallback(HOOK_TCG_OPCODE_CFUNC) - def _hook_tcg_op_cb(handle: int, address: int, arg1: int, arg2: int, key: int): + def __hook_tcg_op_cb(handle: int, address: int, arg1: int, arg2: int, key: int): callback(self, address, arg1, arg2, user_data) opcode = ctypes.c_int(aux1) flags = ctypes.c_int(aux2) - return _hook_tcg_op_cb, opcode, flags + return __hook_tcg_op_cb, opcode, flags handlers: Mapping[int, Callable[[], Tuple]] = { uc.UC_HOOK_INTR : __hook_intr, @@ -934,7 +934,7 @@ class Uc(RegStateManager): """Query an internal Unicorn property. Args: - mode: property identifier (see: UC_QUERY_* constants) + prop: property identifier (see: UC_QUERY_* constants) Returns: property value """