ToKeiChun

Mail List Separator [Pecah Email : (gmail,yahoo,gmx,aol,hotmail,outlook)]

Jan 13th, 2021 (edited)
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.41 KB | None | 0 0
  1. # Usage : python mail.py mailist.txt
  2. import requests
  3. import re
  4. import sys
  5. import threading
  6.  
  7. # COLOR
  8. red = "\033[31m"
  9. green = "\033[32m"
  10. cyan = "\033[36m"
  11. yellow = "\033[93m"
  12. blue = "\033[34m"
  13. purple = "\033[35m"
  14. orange = "\033[33m"
  15. CEND = "\033[0m"
  16.  
  17. def separate(url):
  18.     try:
  19.         if '@gmail' in url:
  20.             print('[ {}{}{} ] : Gmail').format(green,url,CEND)
  21.             open('GMAIL.txt', 'a').write(url + '\n')
  22.         elif '@yahoo' in url:
  23.             print('[ {}{}{} ] : Yahoo!').format(cyan,url,CEND)
  24.             open('YAHOO.txt', 'a').write(url + '\n')
  25.         elif '@gmx' in url:
  26.             print('[ {}{}{} ] : GMX Mail').format(yellow,url,CEND)
  27.             open('GMX.txt', 'a').write(url + '\n')
  28.         elif '@aol' in url:
  29.             print('[ {}{}{} ] : AOL').format(blue,url,CEND)
  30.             open('AOL.txt', 'a').write(url + '\n')
  31.         elif '@hotmail' in url:
  32.             print('[ {}{}{} ] : HOTMail').format(purple,url,CEND)
  33.             open('HOTMAIL.txt', 'a').write(url + '\n')
  34.         elif '@outlook' in url:
  35.             print('[ {}{}{} ] : Outlook.com').format(orange,url,CEND)
  36.             open('OUTLOOK.txt', 'a').write(url + '\n')
  37.         else:
  38.             print('[ {}{}{} ] : OTHERS').format(red,url,CEND)
  39.             open('OTHER.txt', 'a').write(url + '\n')
  40.     except:
  41.         pass
  42. def main():
  43.     threads = []
  44.     email = open(sys.argv[1], 'r').read().splitlines()
  45.     for mail in email:
  46.         go = threading.Thread(target=separate, args=(mail,))
  47.         threads.append(go)
  48.         go.start()
  49.     for go in threads:
  50.         go.join()
  51.  
  52. if __name__ == '__main__':
  53.     main()
  54.  
Add Comment
Please, Sign In to add comment