Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 106e875

Browse files
committedOct 10, 2024·
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 06a0d06 commit 106e875

File tree

1 file changed

+42
-8
lines changed

1 file changed

+42
-8
lines changed
 

‎other/Password_cracking.py

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,48 @@
11
from random import *
22
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=""
3+
4+
u_pwd = input("enter a password")
5+
pwd = [
6+
"a",
7+
"b",
8+
"c",
9+
"d",
10+
"e",
11+
"f",
12+
"1",
13+
"2",
14+
"3",
15+
"4",
16+
"5",
17+
"6",
18+
"g",
19+
"h",
20+
"i",
21+
"j",
22+
"k",
23+
"l",
24+
"m",
25+
"n",
26+
"o",
27+
"p",
28+
"q",
29+
"r",
30+
"s",
31+
"t",
32+
"u",
33+
"w",
34+
"v",
35+
"x",
36+
"y",
37+
"z",
38+
]
39+
pw = ""
40+
while pw != u_pwd:
41+
pw = ""
842
for letter in range(len(u_pwd)):
9-
guess_pwd=pwd[randint(0,17)]
10-
pw=str(guess_pwd)+str(pw)
43+
guess_pwd = pwd[randint(0, 17)]
44+
pw = str(guess_pwd) + str(pw)
1145
print(pw)
1246
print("cracking password...")
1347
os.system("cls")
14-
print("your password is-",pw)
48+
print("your password is-", pw)

0 commit comments

Comments
 (0)
Please sign in to comment.