Created
March 15, 2016 15:25
-
-
Save panchicore/2a8ac280e3c3086333ca 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
import base64 | |
import requests | |
url = "http://foo.bar" | |
users = ["", "admin", "root"] | |
for u in users: | |
for uu in users: | |
login = '{0}:{1}'.format(u, uu) | |
h = {"Authorization": "Basic {0}".format( base64.b64encode(login) )} | |
r = requests.get(url, headers=h) | |
print login, r.status_code, r.ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment