Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Array.au3>
- Local $hTimer = TimerInit()
- Local $charset = "abcdefghijklmnopqrstuvwxyz" ; ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
- Local $password = "applies"
- Local $pwdlength = StringLen($password)
- Local $startime = @MON & "/" & @MDAY & " " & @HOUR & ":" & @MIN
- For $length = 1 To $pwdlength
- Local $combinations = GenerateCombinations($charset, $length)
- For $i = 0 To UBound($combinations) - 1
- Local $fDiff = Round((TimerDiff($hTimer) / 1000) / 60)
- Tooltip(" Password: " & $password & " " & $fDiff & @CRLF & " " & $i & " of " & UBound($combinations) - 1 & " -> " & $length & " of " & $pwdlength & " -> " & $combinations[$i])
- If CheckPassword($combinations[$i], $password) Then
- ToolTip("")
- MsgBox(0, "Password found! " & $startime & " -> " & @MON & "/" & @MDAY & " " & @HOUR & ":" & @MIN, $fDiff & " -> " & $i & " -> " & $combinations[$i])
- Exit
- EndIf
- Next
- Next
- Func GenerateCombinations($charset, $length)
- Local $result[1] = [""]
- For $i = 1 To $length
- Local $temp[UBound($result) * StringLen($charset)]
- Local $index = 0
- For $j = 0 To UBound($result) - 1
- For $k = 1 To StringLen($charset)
- $temp[$index] = $result[$j] & StringMid($charset, $k, 1)
- $index += 1
- Next
- Next
- $result = $temp
- Next
- Return $result
- EndFunc
- Func CheckPassword($attempt, $actualPassword)
- Return $attempt == $actualPassword
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement