vanheartnet

AHK HWID Autoshutdown

Sep 7th, 2020 (edited)
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.99 KB | None | 0 0
  1. #SingleInstance, Force
  2.  
  3. ; AutoHotkey Version: 1.0.39+
  4. ; Language: English
  5. ; Platform: Win2000/XP
  6. ; Author: Laszlo Hars <www.Hars.US>
  7. ; Function: SW copy protection
  8. k0 = 0x99999999 ; 128-bit secret key (example)
  9. k1 = 0x99999999
  10. k2 = 0x99999999
  11. k3 = 0x99999999
  12.  
  13. l0 = 0x99999999 ; 64- bit 2nd secret key (example)
  14. l1 = 0x99999999
  15.  
  16. m0 = 0x99999999 ; 64- bit 3rd secret key (example)
  17. m1 = 0x99999999
  18.  
  19. ;~ IniFile = %PCNAME%.ini
  20.  
  21. ;;;;;; - here starts the modified part - ;;;;;;
  22. PCNAME=VANHEARTNETPISONETAUTOSHUTDOWN
  23.  
  24. InputBox User, User, Enter the User's name,, 220,140
  25. InputBox FGprt,FGprt, Enter the PC Fingerprint,,220,140
  26. InputBox PCNUMBER,PCNUMBER, Enter the PC NAME,,220,140
  27. IniFile = license.ini
  28. Together = %User%%FGprt%%PCNAME%
  29. Auth := XCBC(Hex(Together,StrLen(Together)), 0,0, k0,k1,k2,k3, l0,l1, m0,m1)
  30. FileDelete, license.ini
  31. IniWrite %User%, %IniFile%, %PCNUMBER%, NAME
  32. IniWrite %Auth%, %IniFile%, %PCNUMBER%, LICENSE
  33.  
  34. ;;;;;; - here ends the modified part - ;;;;;;
  35.  
  36. ExitApp
  37.  
  38. ;---- End autoexecute secsion ----;
  39.  
  40. CheckAuth:
  41. IniRead User, %IniFile%, %PCNUMBER%, NAME
  42. IniRead Code, %IniFile%, %PCNUMBER%, LICENSE
  43. PCdata = %COMPUTERNAME%%HOMEPATH%%USERNAME%%PROCESSOR_ARCHITECTURE%%PROCESSOR_IDENTIFIER%
  44. PCdata = %PCdata%%PROCESSOR_LEVEL%%PROCESSOR_REVISION%%A_OSType%%A_OSVersion%%Language%
  45. Fingerprint := XCBC(Hex(PCdata,StrLen(PCdata)), 0,0, 0,0,0,0, 1,1, 2,2)
  46. Together = %User%%Fingerprint%
  47. AuthData := XCBC(Hex(Together,StrLen(Together)), 0,0, k0,k1,k2,k3, l0,l1, m0,m1)
  48. If (User="Error" || Code <> AuthData)
  49. {
  50. S =
  51. ( LTrim
  52. Username = <enter your full username here>
  53. PC Fingerprint = %Fingerprint%
  54. )
  55. ClipBoard = %S%
  56. MsgBox Please Register! Send the following information`n`n%S%`n`n(it has been copied to the ClipBoard)
  57. Run, https://www.facebook.com/js.vanheartnet
  58. ExitApp
  59. }
  60. Return
  61.  
  62. ;---- Crypto functions ----;
  63.  
  64. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TEA cipher ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  65. ; Block encryption with the TEA cipher
  66. ; [y,z] = 64-bit I/0 block
  67. ; [k0,k1,k2,k3] = 128-bit key
  68. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  69.  
  70. TEA(ByRef y,ByRef z, k0,k1,k2,k3)
  71. { ; need SetFormat Integer, D
  72. s = 0
  73. d = 0x9E3779B9
  74. Loop 32 ; could be reduced to 8 for speed
  75. {
  76. k := "k" . s & 3 ; indexing the key
  77. y := 0xFFFFFFFF & (y + ((z << 4 ^ z >> 5) + z ^ s + %k%))
  78. s := 0xFFFFFFFF & (s + d) ; simulate 32 bit operations
  79. k := "k" . s >> 11 & 3
  80. z := 0xFFFFFFFF & (z + ((y << 4 ^ y >> 5) + y ^ s + %k%))
  81. }
  82. }
  83.  
  84. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; XCBC-MAC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  85. ; x = long hex string input
  86. ; [u,v] = 64-bit initial value (0,0)
  87. ; [k0,k1,k2,k3] = 128-bit key
  88. ; [l0,l1] = 64-bit key for not padded last block
  89. ; [m0,m1] = 64-bit key for padded last block
  90. ; Return 16 hex digits (64 bits) digest
  91. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  92.  
  93. XCBC(x, u,v, k0,k1,k2,k3, l0,l1, m0,m1)
  94. {
  95. Loop % Ceil(StrLen(x)/16)-1 ; full length intermediate message blocks
  96. XCBCstep(u, v, x, k0,k1,k2,k3)
  97.  
  98. If (StrLen(x) = 16) ; full length last message block
  99. {
  100. u := u ^ l0 ; l-key modifies last state
  101. v := v ^ l1
  102. XCBCstep(u, v, x, k0,k1,k2,k3)
  103. }
  104. Else { ; padded last message block
  105. u := u ^ m0 ; m-key modifies last state
  106. v := v ^ m1
  107. x = %x%100000000000000
  108. XCBCstep(u, v, x, k0,k1,k2,k3)
  109. }
  110. Return Hex8(u) . Hex8(v) ; 16 hex digits returned
  111. }
  112.  
  113. XCBCstep(ByRef u, ByRef v, ByRef x, k0,k1,k2,k3)
  114. {
  115. StringLeft p, x, 8 ; Msg blocks
  116. StringMid q, x, 9, 8
  117. StringTrimLeft x, x, 16
  118. p = 0x%p%
  119. q = 0x%q%
  120. u := u ^ p
  121. v := v ^ q
  122. TEA(u,v,k0,k1,k2,k3)
  123. }
  124.  
  125. Hex8(i) ; 32-bit integer -> 8 hex digits
  126. {
  127. format = %A_FormatInteger% ; save original integer format
  128. SetFormat Integer, Hex
  129. i += 0x100000000 ; convert to hex, set MS bit
  130. StringTrimLeft i, i, 3 ; remove leading 0x1
  131. SetFormat Integer, %format% ; restore original format
  132. Return i
  133. }
  134.  
  135. Hex(ByRef b, n=0) ; n bytes data -> stream of 2-digit hex
  136. { ; n = 0: all (SetCapacity can be larger than used!)
  137. format = %A_FormatInteger% ; save original integer format
  138. SetFormat Integer, Hex ; for converting bytes to hex
  139.  
  140. m := VarSetCapacity(b)
  141. If (n < 1 or n > m)
  142. n := m
  143. Loop %n%
  144. {
  145. x := 256 + *(&b+A_Index-1) ; get byte in hex, set 17th bit
  146. StringTrimLeft x, x, 3 ; remove 0x1
  147. h = %h%%x%
  148. }
  149. SetFormat Integer, %format% ; restore original format
  150. Return h
  151. }
  152.  
Advertisement
Add Comment
Please, Sign In to add comment