Skip to content

Instantly share code, notes, and snippets.

@Ge0rg3
Last active June 17, 2018 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ge0rg3/f453943704411edbf03424a3fbe44980 to your computer and use it in GitHub Desktop.
Save Ge0rg3/f453943704411edbf03424a3fbe44980 to your computer and use it in GitHub Desktop.
A python tool to spoof emails.
#!/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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment