46 lines
1.0 KiB
AutoHotkey
Executable File
46 lines
1.0 KiB
AutoHotkey
Executable File
#NoEnv
|
|
#SingleInstance force
|
|
#Persistent
|
|
|
|
#F1::
|
|
Password(32)
|
|
return
|
|
|
|
#F2::
|
|
Password(16)
|
|
return
|
|
|
|
Password(Length) {
|
|
InputBox, Service, Website/Service, Enter the name of the site:, , 200, 130
|
|
InputBox, Salt, Password Salt, Enter a salt password:, hide , 200, 130
|
|
Hash := MD5(MD5(Service)Salt)MD5(MD5(Salt)Service)
|
|
Loop, %Length% {
|
|
Char := SubStr(Hash, A_Index*2-1, 2)
|
|
Char2Hex = 0x%Char%
|
|
Hex := Chr(Round((Char2Hex + 0)/2.74)+33)
|
|
Pwd := Pwd Hex
|
|
}
|
|
Clipboard:=Pwd
|
|
MouseGetPos x1, y1
|
|
ToolTip, Password copied to clipboard, %x1%, %y1%
|
|
SetTimer, RemoveToolTip, 1000
|
|
Sleep, 1000
|
|
Reload
|
|
}
|
|
|
|
MD5( ByRef V, L=0 ) {
|
|
VarSetCapacity( MD5_CTX,104,0 ), DllCall( "advapi32\MD5Init", Str,MD5_CTX )
|
|
DllCall( "advapi32\MD5Update", Str,MD5_CTX, Str,V, UInt,L ? L : VarSetCapacity(V) )
|
|
DllCall( "advapi32\MD5Final", Str,MD5_CTX )
|
|
Loop % StrLen( Hex:="123456789ABCDEF0" )
|
|
N := NumGet( MD5_CTX,87+A_Index,"Char"), MD5 .= SubStr(Hex,N>>4,1) . SubStr(Hex,N&15,1)
|
|
Return MD5
|
|
}
|
|
|
|
RemoveToolTip:
|
|
SetTimer, RemoveToolTip, Off
|
|
ToolTip
|
|
return
|
|
|
|
|