SHARE
TWEET

Python API call hook

Winand Mar 28th, 2015 315 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def FSCRT_License_UnlockLibrary_Cracked():
  2.     class SYSTEMTIME(Structure):
  3.         _fields_ = [
  4.               ( 'wYear', c_ushort ),
  5.               ( 'wMonth', c_ushort ),
  6.               ( 'wDayOfWeek', c_ushort ),
  7.               ( 'wDay', c_ushort ),
  8.               ( 'wHour', c_ushort ),
  9.               ( 'wMinute', c_ushort ),
  10.               ( 'wSecond', c_ushort ),
  11.               ( 'wMilliseconds', c_ushort ),
  12.             ]
  13.     def getsystime(lpsystime):
  14.         systime = lpsystime.contents
  15.         systime.wYear = c_ushort(2015)
  16.         systime.wMonth = c_ushort(3)
  17.         systime.wDay = c_ushort(28)
  18.        
  19.     getsystime_p = ctypes.CFUNCTYPE(None, ctypes.POINTER(SYSTEMTIME))(getsystime)
  20.    
  21.     hookdll = ctypes.WinDLL(HookDllPath)
  22.     hookdll.MH_Initialize()
  23.     hookdll.MH_CreateHook(ctypes.windll.kernel32.GetSystemTime, getsystime_p, 0)
  24.     hookdll.MH_EnableHook(ctypes.windll.kernel32.GetSystemTime)
  25.    
  26.     license_id = FSCRT_BSTR("KVPNMMk1OvRL5lwmau/UDuHyapCSoJkZyqTObIfwafrG3WtvNXEwtg==")
  27.     unlockCode = FSCRT_BSTR("8f3w18GNtRkNBDdqtFZS8bag21ld9A4hFhWFi6T5Pcuehbv1FPlx4BKesCkK1r/t13Vd1BLS+F4OjCHYXXw/ED42MeFF5eCaJx8h2DOOE8OEmbdQ6+QxmOL21UFM4XKLbxuQP6hiTp1ErnN/QIdaiPd6dYo8KAxLycDv0XpLo6NfgnS+jEgLslimtEcu7Kb5+By0NC1Sm8cyeAXewbCLfooRxmFpvUsHBTnOw86vq1k8m4HcyVoBo7ZLjbxpA2mbBLbxUL4bC+q4Sy+JeOho9Z0geAmBZSUNzn2N5oiqiqhRHP+p0k0EsMoqdgdlQDOQ6FMYfIg3oZVH7/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ySUMaw0u/MlRjLsUHQS+sQ5x3FZhynBOJeh1Okj8YKCXiheZO4yZjCdLpIbkqCmV6INBDzVBrOLKUQVwC+I6+bQS1q0KZW2wiXJCWHsKtk6i19yYmsf2PUCvQVbQ43YtXlv1glkbtyC6g9PR0WIBCvr1GJ5qjRc25PMbbBwsBzhvn1QAqMkC+jRe2bbiYluijxK33X/1TtuyQpiyjF0DzYfJGEcrZ2XYSYbEdPQYeUKfwirXfm5mI1t0wgnJ/zDx2h16JbcHl9LoCGaR9chHtywFiqchNkX9KP6bOZIlHNvxJAxQmO48HgMNX8uCRRi/EKYJjjD4=")
  28.     ret = hdll.FSCRT_License_UnlockLibrary(byref(license_id), byref(unlockCode))
  29.    
  30.     hookdll.MH_DisableHook(ctypes.windll.kernel32.GetSystemTime)
  31.     hookdll.MH_Uninitialize()
  32.     return ret
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top