-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrute1.py
More file actions
35 lines (33 loc) · 767 Bytes
/
Copy pathbrute1.py
File metadata and controls
35 lines (33 loc) · 767 Bytes
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
import string
password = input ("Insert Password: \n")
def Check(charset, pchar):
for char in charset:
if char==pchar:
print("[+] Trying...", char)
print("[+] ==", char, "<== Matched")
break
else:
print("[+] Trying...", char)
def Brute(paswd):
print("[+][+] Starting Brute Force...")
charset = list(string.ascii_letters)
charset1 = list(string.digits)
charset2 = list(string.punctuation)
result = ""
x=0
while x <= len(paswd)-1:
pchar=paswd[x]
if pchar in charset:
Check(charset,pchar)
x+=1
result+=pchar
elif pchar in charset1:
Check(charset1,pchar)
x+=1
result+=pchar
elif pchar in charset2:
Check(charset2,pchar)
x+=1
result+=pchar
print("[+][+] All Matched - Password Found: ", result)
Brute(password)