Advertisement
Guest User

Untitled

a guest
Apr 10th, 2017
613
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 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 ]\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.  
  41.  
  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. mail.sendmail(my_email[which_email], email_target, str(email_message))
  54. print(counter, "email´s have already been sent")
  55. counter += 1
  56. which_email += 1
  57. now = time.time()
  58. time_difference = now - start_time
  59. print()
  60. print(amount_emails, "emails got successfully sent to", email_target, "it tooks %2f seconds." % (time_difference,))
  61. print("- - - - - - - - - - - - - - - - - - - - ")
  62.  
  63.  
  64. def email_target_question():
  65. email_target_operation = input("Enter your target email [ David / Kim / Ich / spam acc]\n")
  66. print("- - - - - - - - - - - - - - - - - - - - ")
  67. if email_target_operation == "david":
  68. email_target_operation = ("david.aksoy83@googlemail.com")
  69. elif email_target_operation == "kim":
  70. email_target_operation = ("kim.philipp@icloud.com")
  71. elif email_target_operation == "ich":
  72. email_target_operation = ("s.hawranke0601@gmail.com")
  73. elif email_target_operation == "spam acc":
  74. email_target_operation = ("email.spam1337@gmail.com")
  75. else:
  76. pass
  77. return email_target_operation
  78.  
  79.  
  80. def email_change(email_target, email_send, my_email, counter, pw, email_target_question):
  81. while program_stop == False:
  82.  
  83. email_change_question = input("Do you wanna change the email ? [ Y / N / EXIT ]\n")
  84. print("- - - - - - - - - - - - - - - - - - - - ")
  85.  
  86. if email_change_question == "y":
  87. email_target = email_target_question()
  88. email_send(my_email, counter, pw, email_target)
  89.  
  90. elif email_change_question == "n":
  91. email_send(my_email, counter, pw, email_target)
  92.  
  93. elif email_change_question == "exit":
  94. sys.exit(0)
  95.  
  96.  
  97. def read_password_out_of_file(pw):
  98.  
  99. ''' opens the .txt file as myfile '''
  100. with open("EmailPW.txt", "r") as my_file:
  101. ''' adds the password to the list '''
  102. for passwords in my_file:
  103. pw.append(passwords)
  104. return pw
  105.  
  106.  
  107. def email_run(email_counter, email_target):
  108. while True:
  109. if len(email_counter) == 0:
  110. ''' First program loop '''
  111. email_target = email_target_question()
  112. email_send(my_email, counter, pw, email_target)
  113. email_counter.append(1)
  114. return email_counter
  115. else:
  116. ''' Second and last program loop '''
  117. email_change(email_target, email_send, my_email, counter, pw, email_target_question)
  118.  
  119.  
  120. def binary_message(email_message):
  121. if email_message == "binary":
  122. binary_message = []
  123. for i in range(1, 10000):
  124. random_number = randint(0, 1)
  125. binary_message.append(str(random_number))
  126. email_message = binary_message[0:-1]
  127. return email_message
  128. else:
  129. pass
  130.  
  131.  
  132.  
  133.  
  134. ''' Beginning '''
  135. if __name__ == "__main__":
  136. ''' creates an empty list '''
  137. pw = []
  138. email_target = None
  139. counter = 1
  140. email_counter = []
  141.  
  142.  
  143. ''' Emails comes From : '''
  144. my_email = ["email.spam1334@gmail.com", "email.spam1335@gmail.com", "email.spam1336@gmail.com", "email.spam1337@gmail.com"]
  145.  
  146.  
  147. ''' Gets the password out of the .txt file and saves it in a list '''
  148. read_password_out_of_file(pw)
  149. ''' Program start '''
  150. program_stop = False
  151. while not program_stop:
  152. email_run(email_counter, email_target)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement