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)
评论列表
文章目录