Apr-04-2020, 08:18 PM
def main(): # Email Filter # By DsWeb19778 gmail, yahoo, hotmail, outlook, mailru, web = "@gmail", "@yahoo", "@hotmail", "@outlook", "@mail.ru", "@web." print("[+] FILTER EMAILS by [DSWEB19778]") myFile = input("[+] MAILLIST FILE >> ") mode = "r" open_me = open(myFile, mode, encoding="utf8") read_me = open_me.readlines() for mails in read_me: def save_to_file(nameFile, x, msg): kl = open(nameFile, 'a+', encoding="utf8") kl.write(x+"\n") kl.close() print(msg) email = mails.strip() email = mails.lower() if (gmail in email): save_to_file("gmail.txt", email, "[+] Saved "+email) elif (yahoo in email): save_to_file("yahoo.txt", email, "[+] Saved "+email) elif (hotmail in email): save_to_file("hotmail.txt", email, "[+] Saved "+email) elif (outlook in email): save_to_file("outlook.txt", email, "[+] Saved "+email) elif (mailru in email): save_to_file("mailru.txt", email, "[+] Saved "+email) elif (web in email): save_to_file("web.txt", email, "[+] Saved "+email) else: save_to_file("others.txt", email, "[-] Uknown : "+email) print(""" --> FINAL Processing Rzlt : =========================================== [+] GMAIL : """+str(len(list(open("gmail.txt", encoding="utf8"))))+""" [+] YAHOO : """+str(len(list(open("yahoo.txt", encoding="utf8"))))+""" [+] HOTMAIL : """+str(len(list(open("hotmail.txt", encoding="utf8"))))+""" [+] OUTLOOK : """+str(len(list(open("outlook.txt", encoding="utf8"))))+""" [+] MAIL.RU : """+str(len(list(open("mailru.txt", encoding="utf8"))))+""" [+] @WEB : """+str(len(list(open("web.txt", encoding="utf8"))))+""" [+] Others EMAILS : """+str(len(list(open("others.txt", encoding="utf8"))))+""" [TOTAL EMAIL] >> """+str(len(list(open(myFile, encoding="utf8"))))+""" --- ENJOY .... ============================================ """) if __name__ == "__main__": main()How to make this script more faster i just complet coding but i need some tricks to make it fast