Un programma abbastanza completo ,che manda una mail anonima attraverso la famosa tecnica del telnet.E’ ancora un po grezzo XD
from Tkinter import *
from tkMessageBox import *
import webbrowser
import telnetlib
import time
def update():
webbrowser.open('http://codematrix.altervista.org/?cat=15')
def info():
info = Toplevel(main_window)
info.title("Info su MailFakker")
infopack = Label(info,text="Mail Fakker\nRealizzato da MetalNeox (C)\n http://www.codematrix.hellospace.net\nIl programma è rilasciato sotto licensa GPL",foreground='blue')
infopack.pack()
info.resizable(0,0)
def invia():
server="out.alice.it" #Mettere host del server
mail="<"+fake_mail_variable.get()+">"
dest="<"+dest_mail_variable.get()+">"
subject="<"+obj_mail_variable.get()+">"
testo = str(text_area.get('1.0', END))
print(mail+","+dest+","+subject+","+testo+".")
tn = telnetlib.Telnet(server,25)
tn.write("helo "+server+"\n")
tn.write("Mail From:"+mail+"\n")
tn.write("rcpt to:"+dest+"\n")
tn.write("data\n")
tn.write("from:"+mail+"\n")
tn.write("to:"+dest+"\n")
tn.write("subject:"+subject+"\n\n")
tn.write(""+testo+"\n")
tn.write(".\n")
tn.write("quit\n")
print tn.read_all()
def error():
showinfo('greeting', 'Greetings')
def esci():
if askyesno('Vuoi Uscire', 'Vuoi uscire veramente?'):
main_window.destroy()
main_window = Tk()
main_window.title("Mail Fakker")
main_window.geometry("200x330")
menu = Menu(main_window)
aboutmenu = Menu(menu,tearoff=0)
main_window.config(menu = menu)
menu.add_cascade(label="?",menu=aboutmenu)
aboutmenu.add_command(label="Aggiornamenti",command=update)
aboutmenu.add_command(label="Info",command=info)
aboutmenu.add_command(label="Esci",command=esci)
fake_mail_label=Label(text="Email Falsa").pack()
fake_mail_variable=StringVar()
fake_mail_variable.set("mail@falso.it")
fake_mail=Entry(textvariable=fake_mail_variable).pack()
dest_mail_label=Label(text="Email Destinataria").pack()
dest_mail_variable=StringVar()
dest_mail_variable.set("vittima@vittima.it")
dest_mail=Entry(textvariable=dest_mail_variable).pack()
obj_mail_label=Label(text="Soggetto della Mail").pack()
obj_mail_variable=StringVar()
obj_mail=Entry(textvariable=obj_mail_variable).pack()
text_mail_label=Label(text="Inserisci Messaggio").pack()
text_area_variable=StringVar()
text_area_variable.set("")
text_area = Text(main_window, height=10, width=20)
text_area.insert(INSERT,text_area_variable.get())
text_area.pack()
invia = Button(text="Invia",command=invia).pack()
main_window.resizable(0,0)
main_window.mainloop()