Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance, Force
- ; AutoHotkey Version: 1.0.39+
- ; Language: English
- ; Platform: Win2000/XP
- ; Author: Laszlo Hars <www.Hars.US>
- ; Function: SW copy protection
- k0 = 0x99999999 ; 128-bit secret key (example)
- k1 = 0x99999999
- k2 = 0x99999999
- k3 = 0x99999999
- l0 = 0x99999999 ; 64- bit 2nd secret key (example)
- l1 = 0x99999999
- m0 = 0x99999999 ; 64- bit 3rd secret key (example)
- m1 = 0x99999999
- ;~ IniFile = %PCNAME%.ini
- ;;;;;; - here starts the modified part - ;;;;;;
- PCNAME=VANHEARTNETPISONETAUTOSHUTDOWN
- InputBox User, User, Enter the User's name,, 220,140
- InputBox FGprt,FGprt, Enter the PC Fingerprint,,220,140
- InputBox PCNUMBER,PCNUMBER, Enter the PC NAME,,220,140
- IniFile = license.ini
- Together = %User%%FGprt%%PCNAME%
- Auth := XCBC(Hex(Together,StrLen(Together)), 0,0, k0,k1,k2,k3, l0,l1, m0,m1)
- FileDelete, license.ini
- IniWrite %User%, %IniFile%, %PCNUMBER%, NAME
- IniWrite %Auth%, %IniFile%, %PCNUMBER%, LICENSE
- ;;;;;; - here ends the modified part - ;;;;;;
- ExitApp
- ;---- End autoexecute secsion ----;
- CheckAuth:
- IniRead User, %IniFile%, %PCNUMBER%, NAME
- IniRead Code, %IniFile%, %PCNUMBER%, LICENSE
- PCdata = %COMPUTERNAME%%HOMEPATH%%USERNAME%%PROCESSOR_ARCHITECTURE%%PROCESSOR_IDENTIFIER%
- PCdata = %PCdata%%PROCESSOR_LEVEL%%PROCESSOR_REVISION%%A_OSType%%A_OSVersion%%Language%
- Fingerprint := XCBC(Hex(PCdata,StrLen(PCdata)), 0,0, 0,0,0,0, 1,1, 2,2)
- Together = %User%%Fingerprint%
- AuthData := XCBC(Hex(Together,StrLen(Together)), 0,0, k0,k1,k2,k3, l0,l1, m0,m1)
- If (User="Error" || Code <> AuthData)
- {
- S =
- ( LTrim
- Username = <enter your full username here>
- PC Fingerprint = %Fingerprint%
- )
- ClipBoard = %S%
- MsgBox Please Register! Send the following information`n`n%S%`n`n(it has been copied to the ClipBoard)
- Run, https://www.facebook.com/js.vanheartnet
- ExitApp
- }
- Return
- ;---- Crypto functions ----;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TEA cipher ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Block encryption with the TEA cipher
- ; [y,z] = 64-bit I/0 block
- ; [k0,k1,k2,k3] = 128-bit key
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- TEA(ByRef y,ByRef z, k0,k1,k2,k3)
- { ; need SetFormat Integer, D
- s = 0
- d = 0x9E3779B9
- Loop 32 ; could be reduced to 8 for speed
- {
- k := "k" . s & 3 ; indexing the key
- y := 0xFFFFFFFF & (y + ((z << 4 ^ z >> 5) + z ^ s + %k%))
- s := 0xFFFFFFFF & (s + d) ; simulate 32 bit operations
- k := "k" . s >> 11 & 3
- z := 0xFFFFFFFF & (z + ((y << 4 ^ y >> 5) + y ^ s + %k%))
- }
- }
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; XCBC-MAC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; x = long hex string input
- ; [u,v] = 64-bit initial value (0,0)
- ; [k0,k1,k2,k3] = 128-bit key
- ; [l0,l1] = 64-bit key for not padded last block
- ; [m0,m1] = 64-bit key for padded last block
- ; Return 16 hex digits (64 bits) digest
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- XCBC(x, u,v, k0,k1,k2,k3, l0,l1, m0,m1)
- {
- Loop % Ceil(StrLen(x)/16)-1 ; full length intermediate message blocks
- XCBCstep(u, v, x, k0,k1,k2,k3)
- If (StrLen(x) = 16) ; full length last message block
- {
- u := u ^ l0 ; l-key modifies last state
- v := v ^ l1
- XCBCstep(u, v, x, k0,k1,k2,k3)
- }
- Else { ; padded last message block
- u := u ^ m0 ; m-key modifies last state
- v := v ^ m1
- x = %x%100000000000000
- XCBCstep(u, v, x, k0,k1,k2,k3)
- }
- Return Hex8(u) . Hex8(v) ; 16 hex digits returned
- }
- XCBCstep(ByRef u, ByRef v, ByRef x, k0,k1,k2,k3)
- {
- StringLeft p, x, 8 ; Msg blocks
- StringMid q, x, 9, 8
- StringTrimLeft x, x, 16
- p = 0x%p%
- q = 0x%q%
- u := u ^ p
- v := v ^ q
- TEA(u,v,k0,k1,k2,k3)
- }
- Hex8(i) ; 32-bit integer -> 8 hex digits
- {
- format = %A_FormatInteger% ; save original integer format
- SetFormat Integer, Hex
- i += 0x100000000 ; convert to hex, set MS bit
- StringTrimLeft i, i, 3 ; remove leading 0x1
- SetFormat Integer, %format% ; restore original format
- Return i
- }
- Hex(ByRef b, n=0) ; n bytes data -> stream of 2-digit hex
- { ; n = 0: all (SetCapacity can be larger than used!)
- format = %A_FormatInteger% ; save original integer format
- SetFormat Integer, Hex ; for converting bytes to hex
- m := VarSetCapacity(b)
- If (n < 1 or n > m)
- n := m
- Loop %n%
- {
- x := 256 + *(&b+A_Index-1) ; get byte in hex, set 17th bit
- StringTrimLeft x, x, 3 ; remove 0x1
- h = %h%%x%
- }
- SetFormat Integer, %format% ; restore original format
- Return h
- }
Advertisement
Add Comment
Please, Sign In to add comment