import ctypes
from ctypes import wintypes
def check_hook():
pythondllkardesim = ctypes.windll.kernel32.GetModuleHandleW("python311.dll")
if pythondllkardesim == 0:
return False
digerpyrunstringflags = ctypes.windll.kernel32.GetProcAddress(pythondllkardesim, b"PyRun_StringFlags")
if digerpyrunstringflags == 0:
return False
first_byte = ctypes.cast(digerpyrunstringflags, ctypes.POINTER(ctypes.c_ubyte)).contents.value
if first_byte in (0xE8, 0xE9, 0xEA, 0xEB):
return False
return True
#################
if check_hook():
print("hook tespit edilmedi.")
else:
print("hook tespit edildi!")