From 52de5bc43678b291e8a7cfa6d932912c2e4c6024 Mon Sep 17 00:00:00 2001 From: suddodhan <68599647+suddodhan@users.noreply.github.com> Date: Fri, 2 Oct 2020 17:41:23 +0530 Subject: [PATCH] greatearno Program to crack Password in Python --- greatearno | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 greatearno diff --git a/greatearno b/greatearno new file mode 100644 index 0000000..bbe9eab --- /dev/null +++ b/greatearno @@ -0,0 +1,28 @@ +# 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',] + +# 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, 25)] + guess = str(guess_letter) + str(guess) + # printing guessed passwords + print(guess) + +# printing the matched password +print("Your password is",guess)