How to make a simple dictionary attack script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tigerone

How to make a simple dictionary attack script

Post by tigerone » 20 Oct 2016, 07:31

Hey all
i need a script that check specified passwords, like:
0051
1234
123123
0909
can someone help me ?

Thanks

jacksonlord

How to make a simple dictionary attack script

Post by jacksonlord » 20 Oct 2016, 08:00

Hey all
i need a script that check specified words in row one by one
lets say i have these words which i wanna check them via one click (F3)
00123
123123
0900
1456
2022

Thanks.

User avatar
aztec3
Posts: 177
Joined: 07 Apr 2014, 12:05

Re: How to make a simple dictionary attack script

Post by aztec3 » 20 Oct 2016, 09:28

Hope this helps...invoke with F3 (UPDATE: changed upon above request) to execute.

IMPORTANT Requires a Password List text file, default filename = tigerone_PasswordList.txt Just create a text file with each line one of the passwords you want to check, code will prompt for a different file if desired, just hit the enter key to use default.

Also, I included some processing time messages too, can remove if desired.

UPDATE: I still need some additional information on how you use this...right now I only have a 1 second delay before and after the "password" is sent.

Code: Select all

;####################################################################################
; ===== BEGIN Comments Section =====
;
; Filename: tigerone_PasswordChecker_R20161020A.ahk
; OS created in: Windows 7 SP 1
;
; ***** BEGIN IMPORTANT NOTES *****
;
; (1) You must NOT move the mouse or use the keyboard, other than for the file prompt, during the
; execution of this script. 
;
; ***** END IMPORTANT NOTES *****
;
; ***** BEGIN CHANGE HISTORY *****
;
; Created Thursday 2016/10/20 @ 10:22 by aztec3
;
; ***** END CHANGE HISTORY *****
;
; This script reads in a password file (text).
;
; DEFAULT PASSWORD CHECK LIST FILE = tigerone_PasswordList.txt
;
; User is prompted for a specific text file if desired.
;
; ***** BEGIN Code Execution Notes *****
;
; NOTE: The user can change the key/keys used to invoke this script by changing the current
; ^+d (CTRL+SHIFT+d keys) to the desired key/keys.
;
; ***** END Code Execution Notes *****
;
; ===== END Comments Section====
;####################################################################################
;
;####################################################################################
; ===== BEGIN GLOBAL CODE SETTINGS =====
;
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
;#Warn  ; Enable warnings to assist with detecting common errors. (Currently commented out)
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
CoordMode, Mouse, Window ; CoordMode Option
#SingleInstance Force ; Only allows for one instance of this code to run at a time
;
; ===== END GLOBAL CODE SETTINGS =====
;####################################################################################
;
;####################################################################################
; === BEGIN VARIABLE DEFINITIONS ===
;
TimeStart := " " ; Start Time of code execution set to blanked intial value
TimeEnd := " " ; End Time of code execution set to blanked intial value
PasswordListFile := tigerone_PasswordList.txt ; Default Password List
MessageBoxDisplayTimeSeconds = 0.75 ; Controls the amount of time the Message Processing Box displays
; 
; === END VARIABLE DEFINITIONS ===
;####################################################################################
;
;####################################################################################
; === BEGIN MAIN PROGRAM CODE ===
;
F3:: ; F3 to invoke this script
;
gosub InputMessage ; Call subroutine to prompt user to input password list text file
;
gosub WriteToArray ; Call subroutine to read in Password List file to Array
;
gosub OutputMessage ; Display Password File Processing Completed Message
;
return
; === END MAIN PROGRAM CODE ===
;####################################################################################
;
;####################################################################################
; === BEGIN SUBROUTINES ===
;
;####################################################################################
;
; === BEGIN Suboutine InputMessage ===
;
InputMessage: ; Prompt user for Password List file for Replacement/Search processing
;
InputBox, PasswordChecker, INPUT FILE, Enter the file to read in`n`n(NOTE: if NULL then DEFAULT file tigerone_PasswordList.txt is used) ; Prompt for password list file, DEFAULT used if no entry
If (PasswordListFile = "")
	{
		IfNotExist, tigerone_PasswordList.txt
		{
			MsgBox, The default file tigerone_PasswordList.txt was not found.`nPlease place this file or another in the correct format in your directory.`n`nThis script will now terminate.
			ExitApp
		}
		PasswordListFile = tigerone_PasswordList.txt
	}
TimeStart := A_Now ; Start Time of this code
return
;
; === END Subroutine InputMessage ===
;
;####################################################################################
;
; === BEGIN Subroutine WriteToArray ===
;
WriteToArray: ; Reads Password List file into Array so it can be parsed for processing
;
ArrayCount = 0
Loop, Read, %PasswordListFile%   ; This loop retrieves each line from the file, one at a time.
{
    ArrayCount += 1  ; Keep track of how many items are in the array.
    Array%ArrayCount% := A_LoopReadLine  ; Store this line in the next array element.
	StringSplit, OutputArray, Array%ArrayCount%, `, ; Separation Character is a "comma"
	PasswordEntry := OutputArray1 ; Password Entry
	MsgBox, 0, PasswordChecker, Password Checking Processing....please wait...`n`nPassword being checked`n%PasswordEntry%`n`nProcessing Entry %ArrayCount%,%MessageBoxDisplayTimeSeconds% ; Message Box Processing Message
	gosub, PasswordChecking ; Call subroutine to check password entry
}
return
;
; === END Subroutine WriteToArray ===
;
;####################################################################################
;
; === BEGIN Subroutine PasswordChecking ===
;
PasswordChecking: ; Sends the password entry
;
Sleep 1000
Send %PasswordEntry% {Enter}
Sleep 1000
return
;
; === END Subroutine PasswordChecking ===
;
;####################################################################################
;
; === BEGIN Subroutine OutputMessage
;
OutputMessage: ; Message displays final results of the Mail Merge process
;
TimeEnd := A_Now
EndTime := TimeEnd
EnvSub, TimeEnd, %TimeStart%, seconds ; Used to calculate processing Runtime
;gosub FileAppendText
MsgBox,,,Password Checking Processing Complete`n`nTime Start`n%TimeStart%`n`nTime End`n%EndTime%`n`nRuntime = %TimeEnd% seconds
return
;
; === END Subroutine OutputMessage
;
;####################################################################################
;
; === END SUBROUTINES ===
;
;####################################################################################
;
;####################################################################################
; ===== BEGIN DEBUGGING TOOLS =====
;
+esc::exitapp
f11::listvars
f12::reload
;
; ===== END DEBUGGING TOOLS =====
;####################################################################################
; === END OF FILE ===

User avatar
aztec3
Posts: 177
Joined: 07 Apr 2014, 12:05

Re: How to make a simple dictionary attack script

Post by aztec3 » 24 Oct 2016, 07:32

No feedback...you're welcome. Moving on.

SrFrancia
Posts: 1
Joined: 23 Mar 2023, 12:42

Re: How to make a simple dictionary attack script

Post by SrFrancia » 23 Mar 2023, 12:45

Almost 10 years later I made an account only to say: Thank you Sir! I swear I'll put it to good use

Post Reply

Return to “Ask for Help (v1)”