Skip to content

Commit 06a0d06

Browse files
Create Password_cracking.py
Adding Password Cracking code in python
1 parent e9e7c96 commit 06a0d06

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

other/Password_cracking.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from random import *
2+
import os
3+
u_pwd =input("enter a password")
4+
pwd=['a','b','c','d','e','f','1','2','3','4','5','6','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','w','v','x','y','z']
5+
pw=""
6+
while(pw!=u_pwd):
7+
pw=""
8+
for letter in range(len(u_pwd)):
9+
guess_pwd=pwd[randint(0,17)]
10+
pw=str(guess_pwd)+str(pw)
11+
print(pw)
12+
print("cracking password...")
13+
os.system("cls")
14+
print("your password is-",pw)

0 commit comments

Comments
 (0)