mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-09 15:43:04 +03:00
added the same for proxy authorization header
This commit is contained in:
parent
aaebb4336e
commit
149837ebf5
|
@ -1070,6 +1070,7 @@ def __setKnowledgeBaseAttributes():
|
||||||
|
|
||||||
kb.parenthesis = None
|
kb.parenthesis = None
|
||||||
kb.partRun = None
|
kb.partRun = None
|
||||||
|
kb.proxyAuthHeader = None
|
||||||
kb.lastRequestUID = 0
|
kb.lastRequestUID = 0
|
||||||
kb.queryCounter = 0
|
kb.queryCounter = 0
|
||||||
kb.resumedQueries = {}
|
kb.resumedQueries = {}
|
||||||
|
|
|
@ -296,6 +296,7 @@ def initTargetEnv():
|
||||||
kb.injType = None
|
kb.injType = None
|
||||||
kb.nullConnection = None
|
kb.nullConnection = None
|
||||||
kb.parenthesis = None
|
kb.parenthesis = None
|
||||||
|
kb.proxyAuthHeader = None
|
||||||
kb.unionComment = ""
|
kb.unionComment = ""
|
||||||
kb.unionCount = None
|
kb.unionCount = None
|
||||||
kb.unionPosition = None
|
kb.unionPosition = None
|
||||||
|
|
|
@ -124,6 +124,9 @@ class Connect:
|
||||||
if kb.authHeader:
|
if kb.authHeader:
|
||||||
headers["Authorization"] = kb.authHeader
|
headers["Authorization"] = kb.authHeader
|
||||||
|
|
||||||
|
if kb.proxyAuthHeader:
|
||||||
|
headers["Proxy-authorization"] = kb.proxyAuthHeader
|
||||||
|
|
||||||
if auxHeaders:
|
if auxHeaders:
|
||||||
for key, item in auxHeaders.items():
|
for key, item in auxHeaders.items():
|
||||||
headers[key] = item
|
headers[key] = item
|
||||||
|
@ -169,6 +172,9 @@ class Connect:
|
||||||
if req.has_header("Authorization"):
|
if req.has_header("Authorization"):
|
||||||
kb.authHeader = req.headers["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:
|
if hasattr(conn, "redurl") and hasattr(conn, "redcode") and not conf.redirectHandled:
|
||||||
msg = "sqlmap got a %d redirect to " % conn.redcode
|
msg = "sqlmap got a %d redirect to " % conn.redcode
|
||||||
msg += "%s - What target address do you " % conn.redurl
|
msg += "%s - What target address do you " % conn.redurl
|
||||||
|
|
Loading…
Reference in New Issue
Block a user