Advertisement
Guest User

Untitled

a guest
Feb 14th, 2018
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. # -*- coding: UTF-8 -*-
  2. import smtplib
  3. import datetime
  4. import random
  5. import time
  6.  
  7. class spammer():
  8. def __init__(self):
  9. self.logo = """
  10.  
  11.  
  12. _______..______ ___ .___ ___. .___ ___. _______ .______
  13. / || _ \ / \ | \/ | | \/ | | ____|| _ \
  14. | (----`| |_) | / ^ \ | \ / | | \ / | | |__ | |_) |
  15. \ \ | ___/ / /_\ \ | |\/| | | |\/| | | __| | /
  16. .----) | | | / _____ \ | | | | | | | | | |____ | |\ \----.
  17. |_______/ | _| /__/ \__\ |__| |__| |__| |__| |_______|| _| `._____|
  18.  
  19.  
  20.  
  21. |~) (\_ _ _
  22. |_)\/ (_/_| (_|
  23. /
  24.  
  25. Based off: https://github.com/Hadesy2k/mail-spammer/blob/6166c2f57a9xxe38227ba6047da0606de419a1f4a5/mail-spammer.py
  26. """
  27. self.banner()
  28. self.spam()
  29.  
  30. def banner(self):
  31. print(self.logo)
  32. def spam(self):
  33. # Credentials
  34. precon = input("Enter a preconfig ID: ")
  35. if precon.lower() == "t":
  36. global username, password, target
  37. username = "1234567890asdghjklafienafepi@gmail.com"
  38. password = "asdfghjkl;'"
  39. target = "ezra@manmans.com"
  40. elif precon.lower() == "a":
  41. username = "1234567890asdghjklafienafepi@gmail.com"
  42. password = "asdfghjkl;'"
  43. target = "21ashah@athenian.org"
  44. elif precon.lower() == "d":
  45. username = "1234567890asdghjklafienafepi@gmail.com"
  46. password = "asdfghjkl;'"
  47. target = "20dzhong@athenian.org"
  48. else:
  49. username = input("Enter your gmail: ")
  50. password = input("Enter your password")
  51. target = input("Target email: ")
  52. spams = int(input("No. of mails to send: "))
  53.  
  54. server = smtplib.SMTP('smtp.gmail.com:587')
  55. server.starttls()
  56. try: server.login(username, password)
  57. except: print("[-] Authentication Error") ; exit()
  58.  
  59. print("[!] Engaging the target")
  60. with open('quotelist.txt', 'r') as add_message:
  61. global bodies
  62. bodies = add_message.read().split('",\n')
  63. print(len(bodies))
  64. try:
  65. for i in range(1, spams+1):
  66. global bodies
  67. namelist = ["Emmanuel Johnson", "Grey Dickenson", "James Bamford", "Crawford Benedict",
  68. "Ezra Newman", "Pixie", "James Stewart", "Porter Robertson",
  69. "Okonkwo and the men of Umoafia", "Porygon2", "Prince Ikumefuna"]
  70. subj = random.randrange(0, 999999999999999999)
  71. content = bodies[random.randrange(0, len(bodies))] + '"'
  72. name = namelist[random.randrange(0, len(namelist))]
  73. date = datetime.datetime.now().strftime( "%d/%m/%Y %H:%M" )
  74. msg = "From: %s\nTo: %s\nSubject: %s\nDate: %s\n\n%s" % (name, target, subj, date, content)
  75. server.sendmail(username, target, msg)
  76. print("Email #" + str(i) + " sent.")
  77. time.sleep(random.randrange(1, 1000)/10)
  78. except smtplib.SMTPException:
  79. print( "[-] An Error Occured During Process")
  80. print( "[!] The target email might be wrong")
  81. exit()
  82. server.quit()
  83. print("[+] Target engaging complete")
  84.  
  85. try:
  86. spammer()
  87. except KeyboardInterrupt:
  88. print( "\n[-] Program Interrupted")
  89. exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement