hooks.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:PythonForWindows 作者: hakril 项目源码 文件源码
def __init__(self, IAT_entry, callback, types=None):
        if types is None:
            if not hasattr(callback, "_types_info"):
                raise ValueError("Callback for IATHook has no type infomations")
            types = callback._types_info
        self.original_types = types
        self.callback_types = self.transform_arguments(self.original_types)
        self.entry = IAT_entry
        self.callback = callback
        self.stub = ctypes.WINFUNCTYPE(*self.callback_types)(self.hook_callback)
        self.stub_addr = ctypes.cast(self.stub, PVOID).value
        self.realfunction = ctypes.WINFUNCTYPE(*types)(IAT_entry.nonhookvalue)
        self.is_enable = False
        #IATHook.yolo.append(self)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号