Guest User

Untitled

a guest
Jun 18th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. #!/usr/bin/python
  2. import smtplib, string
  3. import os, time
  4.  
  5. def terms():
  6. agree = raw_input("Please agree to never use this tool for malicious intent (y/n). ")
  7. agree = agree.lower()
  8. if agree == "y":
  9. os.system("apt-get install sendmail")
  10. time.sleep(1)
  11. else:
  12. exit()
  13. terms()
  14.  
  15. def theprogram():
  16. os.system("/etc/init.d/sendmail start")
  17. time.sleep(1)
  18. os.system("clear")
  19. print(".oPYo. o 8 .oPYo. d'b ")
  20. print("8. 8 8 8 ")
  21. print("`boo ooYoYo. .oPYo. o8 8 `Yooo. .oPYo. .oPYo. .oPYo. o8P .oPYo. oPYo. ")
  22. print(".P 8' 8 8 .oooo8 8 8 `8 8 8 8 8 8 8 8 8oooo8 8 `' ")
  23. print("8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8. 8 ")
  24. print("`YooP' 8 8 8 `YooP8 8 8 `YooP' 8YooP' `YooP' `YooP' 8 `Yooo' 8 ")
  25. print(":.....:..:..:..:.....::....:::.....:8 ....::.....::.....::..:::.....:..::::")
  26. print("::::::::::::::::::::::::::::::::::::8 :::::::::::::::::::::::::::::::::::::")
  27. print("::::::::::::::::::::::::::::::::::::..:::::::::::by George Omnet 2017::::::\n\n")
  28.  
  29.  
  30. FROM = raw_input("Address to be sent from: ")
  31. TO = raw_input("Address to be sent to: ")
  32. SUBJECT = raw_input("Subject of email: ")
  33. TEXT = raw_input("Email text: ")
  34. HOST = "localhost"
  35. BODY = string.join((
  36. "From: %s" % FROM,
  37. "To: %s" % TO,
  38. "Subject: %s" % SUBJECT ,
  39. "",
  40. TEXT
  41. ), "\r\n")
  42. server = smtplib.SMTP(HOST)
  43. server.sendmail(FROM, [TO], BODY)
  44. server.quit()
  45.  
  46. if os.path.exists('emailspooflog') == True:
  47. f= open("emailspooflog","r+")
  48. else:
  49. f= open("emailspooflog","w+")
  50.  
  51. towrite = str("==============================================================\n"+"Sent to: "+TO+"\nSent from: "+FROM+"\n\nSubject: "+SUBJECT+"\nBody text: "+TEXT+"\n==============================================================\n")
  52. with open("emailspooflog", 'r+') as f:
  53. content = f.read()
  54. f.seek(0,0)
  55. f.write(towrite + content)
  56. time.sleep(1)
  57. os.system("/etc/init.d/sendmail stop")
  58. answer = raw_input("Would you like to send another? y/n ")
  59. answer = answer.lower()
  60. if answer == "y":
  61. theprogram()
  62.  
  63. else:
  64. exit()
  65. theprogram()
Add Comment
Please, Sign In to add comment