Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import smtplib, string
- import os, time
- def terms():
- agree = raw_input("Please agree to never use this tool for malicious intent (y/n). ")
- agree = agree.lower()
- if agree == "y":
- os.system("apt-get install sendmail")
- time.sleep(1)
- else:
- exit()
- terms()
- def theprogram():
- os.system("/etc/init.d/sendmail start")
- time.sleep(1)
- os.system("clear")
- print(".oPYo. o 8 .oPYo. d'b ")
- print("8. 8 8 8 ")
- print("`boo ooYoYo. .oPYo. o8 8 `Yooo. .oPYo. .oPYo. .oPYo. o8P .oPYo. oPYo. ")
- print(".P 8' 8 8 .oooo8 8 8 `8 8 8 8 8 8 8 8 8oooo8 8 `' ")
- print("8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8. 8 ")
- print("`YooP' 8 8 8 `YooP8 8 8 `YooP' 8YooP' `YooP' `YooP' 8 `Yooo' 8 ")
- print(":.....:..:..:..:.....::....:::.....:8 ....::.....::.....::..:::.....:..::::")
- print("::::::::::::::::::::::::::::::::::::8 :::::::::::::::::::::::::::::::::::::")
- print("::::::::::::::::::::::::::::::::::::..:::::::::::by George Omnet 2017::::::\n\n")
- FROM = raw_input("Address to be sent from: ")
- TO = raw_input("Address to be sent to: ")
- SUBJECT = raw_input("Subject of email: ")
- TEXT = raw_input("Email text: ")
- HOST = "localhost"
- BODY = string.join((
- "From: %s" % FROM,
- "To: %s" % TO,
- "Subject: %s" % SUBJECT ,
- "",
- TEXT
- ), "\r\n")
- server = smtplib.SMTP(HOST)
- server.sendmail(FROM, [TO], BODY)
- server.quit()
- if os.path.exists('emailspooflog') == True:
- f= open("emailspooflog","r+")
- else:
- f= open("emailspooflog","w+")
- towrite = str("==============================================================\n"+"Sent to: "+TO+"\nSent from: "+FROM+"\n\nSubject: "+SUBJECT+"\nBody text: "+TEXT+"\n==============================================================\n")
- with open("emailspooflog", 'r+') as f:
- content = f.read()
- f.seek(0,0)
- f.write(towrite + content)
- time.sleep(1)
- os.system("/etc/init.d/sendmail stop")
- answer = raw_input("Would you like to send another? y/n ")
- answer = answer.lower()
- if answer == "y":
- theprogram()
- else:
- exit()
- theprogram()
Add Comment
Please, Sign In to add comment