Skip to content

Instantly share code, notes, and snippets.

@Jcpetrucci
Created February 15, 2015 21:49
Show Gist options
  • Save Jcpetrucci/55b0fa27adb736c6d20f to your computer and use it in GitHub Desktop.
Save Jcpetrucci/55b0fa27adb736c6d20f to your computer and use it in GitHub Desktop.
Brute force passwords with AutoHotKey
DetectHiddenWindows on
DetectHiddenText on
;SetTitleMatchMode 2
;SetTitleMatchMode Slow
#z::
SetKeyDelay 100
Loop, read, D:\wordlist.txt
{
TrayTip Now trying:, %A_LoopReadLine%, 1 ;Creates tooltip so we can monitor the progress through wordlist.
SendRaw %A_LoopReadLine% ;Type the current line into box
Send {enter} ;Submit this password
Sleep 1250 ;Wait while the password is tried
WinGetActiveTitle, varRespondingWindow ;Check resulting dialogue (look for 'invalid passphrase' error)
if ( varRespondingWindow = "Invalid Passphrase" ) {
Send {enter} ;Acknowledge the 'wrong password' dialogue
} else {
MsgBox % "Found valid password: " . A_LoopReadLine
return
}
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment