-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBruteForce.py
55 lines (45 loc) · 955 Bytes
/
BruteForce.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
PassWord=input("Enter the password: ")
password = open("dict.txt", "r")
array=[]
numbers=[]
letters="0123456789abcdefghijklmnopqrstuvwxyz"
for m in range(1000):
numbers+=[m]
x=""
storage=""
num=""
lines = password.readlines()
for pw in lines:
array+=[pw.strip()]
def check(x,p):
if(PassWord==x):
print("Password is: "+PassWord)
return True
else:
print("Wrong password: "+ x)
def checkOthers():
for j in range (0,36):
for i in array:
x=i+letters[j]
if check(x,PassWord):
return
x=letters[j]+i
if check(x,PassWord):
return
for j in range (0,36):
for k in range(0,36):
if k != j:
for i in array:
x=i+letters[k]+letters[j]
if check(x,PassWord):
return
x=letters[k]+letters[j]+i
if check(x,PassWord):
return
x=letters[j]+i+letters[k]
if check(x,PassWord):
return
for i in array:
a= check(i, PassWord)
if a != True:
checkOthers()