Last active
June 5, 2022 15:30
-
-
Save PushkraJ99/99e54295b9db444449815af4b82e98ce to your computer and use it in GitHub Desktop.
Password Cracker Made in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Password Cracker (Github:-PushkraJ99) | |
| # importing random | |
| from random import* | |
| # taking input from user | |
| user_pass = input("Enter your password :- ") | |
| # storing alphabet letter to use thm to crack password | |
| password = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j','k', | |
| 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't','u','v', | |
| 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', | |
| '8', '9', '0', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', | |
| 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', | |
| 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '`', '~', '!', '@', | |
| '#', '$', '%', '^', '&', '*', '(', ')', '-', '_', '=', ] | |
| # initializing an empty string | |
| guess = "" | |
| # using while loop to generate many passwords untill one of | |
| # them does not matches user_pass | |
| while (guess != user_pass): | |
| guess = "" | |
| # generating random passwords using for loop | |
| for letter in range(len(user_pass)): | |
| guess_letter = password[randint(0, 70)] | |
| guess = str(guess_letter) + str(guess) | |
| # printing guessed passwords | |
| print(guess) | |
| # printing the matched password | |
| print("Your password is",guess) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment