Advertisement
Guest User

Untitled

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