Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.08 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()
  90. RAW Paste Data
  91.  
  92. # -*- coding: UTF-8 -*-
  93. import smtplib
  94. import datetime
  95. import random
  96. import time
  97.  
  98. class spammer():
  99. def __init__(self):
  100. self.logo = """
  101.  
  102.  
  103. _______..______ ___ .___ ___. .___ ___. _______ .______
  104. / || _ \ / \ | \/ | | \/ | | ____|| _ \
  105. | (----`| |_) | / ^ \ | \ / | | \ / | | |__ | |_) |
  106. \ \ | ___/ / /_\ \ | |\/| | | |\/| | | __| | /
  107. .----) | | | / _____ \ | | | | | | | | | |____ | |\ \----.
  108. |_______/ | _| /__/ \__\ |__| |__| |__| |__| |_______|| _| `._____|
  109.  
  110.  
  111.  
  112. |~) (\_ _ _
  113. |_)\/ (_/_| (_|
  114. /
  115.  
  116. Based off: https://github.com/Hadesy2k/mail-spammer/blob/6166c2f57a9xxe38227ba6047da0606de419a1f4a5/mail-spammer.py
  117. """
  118. self.banner()
  119. self.spam()
  120.  
  121. def banner(self):
  122. print(self.logo)
  123. def spam(self):
  124. # Credentials
  125. precon = input("Enter a preconfig ID: ")
  126. if precon.lower() == "t":
  127. global username, password, target
  128. username = "1234567890asdghjklafienafepi@gmail.com"
  129. password = "asdfghjkl;'"
  130. target = "ezra@manmans.com"
  131. elif precon.lower() == "a":
  132. username = "1234567890asdghjklafienafepi@gmail.com"
  133. password = "asdfghjkl;'"
  134. target = "21ashah@athenian.org"
  135. elif precon.lower() == "d":
  136. username = "1234567890asdghjklafienafepi@gmail.com"
  137. password = "asdfghjkl;'"
  138. target = "donovanzhong@gmail.com"
  139. else:
  140. username = input("Enter your gmail: ")
  141. password = input("Enter your password")
  142. target = input("Target email: ")
  143. spams = int(input("No. of mails to send: "))
  144.  
  145. server = smtplib.SMTP('smtp.gmail.com:587')
  146. server.starttls()
  147. try: server.login(username, password)
  148. except: print("[-] Authentication Error") ; exit()
  149.  
  150. print("[!] Engaging the target")
  151. with open('quotelist.txt', 'r') as add_message:
  152. global bodies
  153. bodies = add_message.read().split('",\n')
  154. print(len(bodies))
  155. try:
  156. for i in range(1, spams+1):
  157. global bodies
  158. namelist = ["Emmanuel Johnson", "Grey Dickenson", "James Bamford", "Crawford Benedict",
  159. "Ezra Newman", "Pixie", "James Stewart", "Porter Robertson",
  160. "Okonkwo and the men of Umoafia", "Porygon2", "Prince Ikumefuna"]
  161. subj = random.randrange(0, 999999999999999999)
  162. content = bodies[random.randrange(0, len(bodies))] + '"'
  163. name = namelist[random.randrange(0, len(namelist))]
  164. date = datetime.datetime.now().strftime( "%d/%m/%Y %H:%M" )
  165. msg = "From: %s\nTo: %s\nSubject: %s\nDate: %s\n\n%s" % (name, target, subj, date, content)
  166. server.sendmail(username, target, msg)
  167. print("Email #" + str(i) + " sent.")
  168. time.sleep(random.randrange(1, 1000)/10)
  169. except smtplib.SMTPException:
  170. print( "[-] An Error Occured During Process")
  171. print( "[!] The target email might be wrong")
  172. exit()
  173. server.quit()
  174. print("[+] Target engaging complete")
  175.  
  176. try:
  177. spammer()
  178. except KeyboardInterrupt:
  179. print( "\n[-] Program Interrupted")
  180. exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement