Brute Force Password List Generator

Crunch is an easy to use tool for generating a custom made password list used for brute force password cracking. Crunch comes as a standard tool in Kali Linux. This tutorial shows you how easy it is to generate a password list containing all combinations of 4 letters, 5 letters and a password list containing 5 letters followed by a year. I need to make small programs for school to brute force crack different types of passwords; I'm looking to create a brute force python code that will run through every possible combination of alphabetical and alphanumerical passwords and give me the password and the amount of time it took to crack.

bruteforce.py
''
Password brute-force algorithm.
List of most probable passwords and english names can be found, respectively, at:
- https://github.com/danielmiessler/SecLists/blob/master/Passwords/probable-v2-top12000.txt
- https://github.com/dominictarr/random-name/blob/master/middle-names.txt
Author: Raphael Vallat
Date: May 2018
Python 3
''
importstring
fromitertoolsimportproduct
fromtimeimporttime
fromnumpyimportloadtxt
defproduct_loop(password, generator):
forpingenerator:
if'.join(p) password:
print('nPassword:', '.join(p))
return'.join(p)
returnFalse
defbruteforce(password, max_nchar=8):
''Password brute-force algorithm.
Parameters
----------
password : string
To-be-found password.
max_nchar : int
Maximum number of characters of password.
Return
------
bruteforce_password : string
Brute-forced password
''
print('1) Comparing with most common passwords / first names')
common_pass=loadtxt('probable-v2-top12000.txt', dtype=str)
common_names=loadtxt('middle-names.txt', dtype=str)
cp= [cforcincommon_passifcpassword]
cn= [cforcincommon_namesifcpassword]
cnl= [c.lower() forcincommon_namesifc.lower() password]
iflen(cp) 1:
print('nPassword:', cp)
returncp
iflen(cn) 1:
print('nPassword:', cn)
returncn
iflen(cnl) 1:
print('nPassword:', cnl)
returncnl
print('2) Digits cartesian product')
forlinrange(1, 9):
generator=product(string.digits, repeat=int(l))
print('t.%d digit'%l)
p=product_loop(password, generator)
ifpisnotFalse:
returnp
print('3) Digits + ASCII lowercase')
forlinrange(1, max_nchar+1):
print('t.%d char'%l)
generator=product(string.digits+string.ascii_lowercase,
repeat=int(l))
p=product_loop(password, generator)
ifpisnotFalse:
returnp
print('4) Digits + ASCII lower / upper + punctuation')
# If it fails, we start brute-forcing the 'hard' way
# Same as possible_char = string.printable[:-5]
all_char=string.digits+string.ascii_letters+string.punctuation
forlinrange(1, max_nchar+1):
print('t.%d char'%l)
generator=product(all_char, repeat=int(l))
p=product_loop(password, generator)
ifpisnotFalse:
returnp
# EXAMPLE
start=time()
bruteforce('sunshine') # Try with '123456' or '751345' or 'test2018'
end=time()
print('Total time: %.2f seconds'% (end-start))

commented Jan 13, 2020

Can you please upload the 'probable-v2-top12000.txt' file

commented Jan 13, 2020

Can you please upload the 'probable-v2-top12000.txt' file

The text file can be found at https://github.com/danielmiessler/SecLists/blob/master/Passwords/probable-v2-top12000.txt

commented Jan 22, 2020

is this still viable for current version of python?

commented Jan 22, 2020

This code was written and tested in Python 3.6. However, I haven't tried it on Python 3.7 / 3.8. Please let me know if you do. Thanks

A circuit design software forms a very essential part of an electronics engineers life. A good tool allows you to build designs and checks for problems with the design at regular intervals. It is also easy to navigate with sufficient options available for optimum circuit design. Circuit design is the first step for every electronics design project and requires the creation of a schematic diagram. The schematic defines how the pins of electrical components are logically connected together on a printed circuit board (PCB). When the circuit design is complete, engineers can use their schematic. Hades is a circuit design and simulation software for Windows. This open source software has a bunch of simple as well as complex components. Use these parts to design and simulate a digital circuit. The components available are: Logic Gates, ICs, Vcc, Ground, Hexa Switch, Clock Generator, Flip Flops, RTL, etc. CircuitMaker is the best free PCB design software by Altium for Open Source Hardware Designers, Hackers, Makers, Students and Hobbyists. Circuit design software. Cricut Design Space.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment