Advertisement
Guest User

Untitled

a guest
Apr 4th, 2020
12,490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.08 KB | None | 0 0
  1. def main():
  2.  
  3.     # Email Filter
  4.     # By DsWeb19778
  5.  
  6.     gmail, yahoo, hotmail, outlook, mailru, web = "@gmail", "@yahoo", "@hotmail", "@outlook", "@mail.ru", "@web."
  7.  
  8.     print("[+] FILTER EMAILS by [DSWEB19778]")
  9.  
  10.     myFile = input("[+] MAILLIST FILE >> ")
  11.  
  12.     mode = "r"
  13.     open_me = open(myFile, mode, encoding="utf8")
  14.     read_me = open_me.readlines()
  15.  
  16.     for mails in read_me:
  17.  
  18.         def save_to_file(nameFile, x, msg):
  19.             kl = open(nameFile, 'a+', encoding="utf8")
  20.             kl.write(x+"\n")
  21.             kl.close()
  22.             print(msg)
  23.  
  24.         email = mails.strip()
  25.         email = mails.lower()
  26.  
  27.         if (gmail in email):
  28.             save_to_file("gmail.txt", email, "[+] Saved "+email)
  29.         elif (yahoo in email):
  30.             save_to_file("yahoo.txt", email, "[+] Saved "+email)
  31.         elif (hotmail in email):
  32.             save_to_file("hotmail.txt", email, "[+] Saved "+email)
  33.         elif (outlook in email):
  34.             save_to_file("outlook.txt", email, "[+] Saved "+email)
  35.         elif (mailru in email):
  36.             save_to_file("mailru.txt", email, "[+] Saved "+email)
  37.         elif (web in email):
  38.             save_to_file("web.txt", email, "[+] Saved "+email)
  39.         else:
  40.             save_to_file("others.txt", email, "[-] Uknown : "+email)
  41.  
  42.     print("""
  43. --> FINAL Processing Rzlt :
  44. ===========================================
  45. [+] GMAIL : """+str(len(list(open("gmail.txt", encoding="utf8"))))+"""
  46. [+] YAHOO : """+str(len(list(open("yahoo.txt", encoding="utf8"))))+"""
  47. [+] HOTMAIL : """+str(len(list(open("hotmail.txt", encoding="utf8"))))+"""
  48. [+] OUTLOOK : """+str(len(list(open("outlook.txt", encoding="utf8"))))+"""
  49. [+] MAIL.RU : """+str(len(list(open("mailru.txt", encoding="utf8"))))+"""
  50. [+] @WEB : """+str(len(list(open("web.txt", encoding="utf8"))))+"""
  51. [+] Others EMAILS : """+str(len(list(open("others.txt", encoding="utf8"))))+"""
  52. [TOTAL EMAIL] >> """+str(len(list(open(myFile, encoding="utf8"))))+"""
  53. --- ENJOY ....
  54. ============================================
  55.        """)
  56.  
  57.  
  58. if __name__ == "__main__":
  59.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement