Brute force image

Python Wordlist for Brute Force Password Cracking

This article will let you create a General password list which can be used in any password cracking attack .

Lets jump into the code →

Libraries →

itertools → used for efficient and simple looping
string → to use string functions
time → to get time

Function →

def password_wordlist(start_range=8,end_range=10,file_name="brute.txt"):

It takes up 3 arguments →
start_range → Potential length of your password
Now lets assume you are brute forcing for wifi and you know the length can extend from 8 to bigger numbers
end_range → Max potential length the password could have
file_name → file name to save the generated passwords

f = open(file_name,'a')
for password_length in range(start_range, end_range):
for guess in itertools.product(chars,repeat=password_length):

itertools.product → product(A,B) is similar to ((x,y) for x in A for y in B)
product(‘ABCD’ , repeat=2) → AA,AB,AC,AD …. …. … DC , DD
You can read more about it →

start_range = 8
end_range = 10
file_name = "brute_password_list.txt"

Changing start_range and end_range and chars
Example → Your friend send you a zip file with password in digits of length between 4–5
So you will need to change only these three parameters
For this case →
start_range = 4
end_range = 5+1
chars = string.digits

start_time = time.time()
end_time = time.time()

end_time — start_time will give you the execution time for password_list function .

So this was all about code.

Your file will look something like this if you implement the code given at the start →

Hope you enjoyed it. In case of any queries ping me on below links.

Please Upvote 👍!

Thank You !



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store