added the same for proxy authorization header

This commit is contained in:
Miroslav Stampar
2010-10-18 09:02:56 +00:00
parent aaebb4336e
commit 149837ebf5
3 changed files with 8 additions and 0 deletions

View File

@@ -124,6 +124,9 @@ class Connect:
if kb.authHeader:
headers["Authorization"] = kb.authHeader
if kb.proxyAuthHeader:
headers["Proxy-authorization"] = kb.proxyAuthHeader
if auxHeaders:
for key, item in auxHeaders.items():
headers[key] = item
@@ -169,6 +172,9 @@ class Connect:
if req.has_header("Authorization"):
kb.authHeader = req.headers["Authorization"]
if req.has_header("Proxy-authorization"):
kb.proxyAuthHeader = req.headers["Proxy-authorization"]
if hasattr(conn, "redurl") and hasattr(conn, "redcode") and not conf.redirectHandled:
msg = "sqlmap got a %d redirect to " % conn.redcode
msg += "%s - What target address do you " % conn.redurl