Gui, Add, Edit, x76 y10 w100 h20 vpw password ,
Gui, Add, Text, x6 y10 w70 h20 , Passwort:
Gui, Add, Button, x93 y40 w70 h30 gabbrechen +Default, Exit
Gui, Add, Button, x13 y40 w70 h30 glogin +default, Login
Gui, Show, h83 w188, Passwort eingeben..
Return
login:
Gui,Submit,
if(md5(pw) = "098f6bcd4621d373cade4e832627b4f6") ;= test
{
MsgBox Passwort ist Richtig :)
;Gui, Show,,
}
else
{
MsgBox Falsches Passwort.
}
exitapp
Return
abbrechen:
MsgBox, 4,, Bist du dir sicher das du den Keybinder beenden möchtest?
IfMsgBox Yes
{
ExitApp
}
else
{
Gui, Show,
}
return
;-------------------------------------------
;by Lazlo from: http://www.autohotkey.com/forum/topic17853.html
MD5(ByRef Buf, L=0) { ; Binary buffer, Length in bytes
Static P, Q, N, i, a,b,c,d, t, h0,h1,h2,h3, y = 0xFFFFFFFF
h0 := 0x67452301, h1 := 0xEFCDAB89, h2 := 0x98BADCFE, h3 := 0x10325476
if(!md5initdone) ;//mod isnull
initmd5()
if(L == 0) ;//mod isnull
L := StrLen(Buf)
N := ceil((L+9)/64)*64 ; padded length (100..separator, 8B length)
VarSetCapacity(Q,N,0) ; room for padded data
P := &Q ; pointer
DllCall("RtlMoveMemory", UInt,P, UInt,&Buf, UInt,L) ; copy data
DllCall("RtlFillMemory", UInt,P+L, UInt,1, UInt,0x80) ; pad separator
DllCall("ntdll.dll\RtlFillMemoryUlong",UInt,P+N-8,UInt,4,UInt,8*L) ; at end: length in bits < 512 MB
Loop % N//64 {
Loop 16
i := A_Index-1, w%i% := *P | *(P+1)<<8 | *(P+2)<<16 | *(P+3)<<24, P += 4
a := h0, b := h1, c := h2, d := h3
Loop 64 {
i := A_Index-1
If i < 16
f := (b & c) | (~b & d), g := i
Else If i < 32
f := (d & b) | (~d & c), g := 5*i+1 & 15
Else If i < 48
f := b ^ c ^ d, g := 3*i+5 & 15
Else
f := c ^ (b | ~d), g := 7*i & 15
t := d, d := c, c := b
b += rotate(a + f + k%i% + w%g%, r%i%) ; reduced to 32 bits later
a := t
}
h0 := h0+a & y, h1 := h1+b & y, h2 := h2+c & y, h3 := h3+d & y
}
Return hex(h0) . hex(h1) . hex(h2) . hex(h3)
}
rotate(a,b) { ; 32-bit rotate a to left by b bits, bit32..63 garbage
Return a << b | (a & 0xFFFFFFFF) >> (32-b)
}
hex(x) { ; 32-bit little endian hex digits
SetFormat Integer, HEX
x += 0x100000000, x := SubStr(x,-1) . SubStr(x,8,2) . SubStr(x,6,2) . SubStr(x,4,2)
SetFormat Integer, DECIMAL
Return x
}
;//mod isnull
initmd5(){
global
; GLOBAL CONSTANTS r[64], k[64]
r = 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22
, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20
, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23
, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21
StringSplit r, r, `,
r0 := 7
Loop 64
i := A_Index-1, k%i% := floor(abs(sin(A_Index)) * 2**32)
md5initdone := true
}
Alles anzeigen