mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-28 20:43:49 +03:00
More verbose messages on successful --null-connection
This commit is contained in:
parent
8883918ef9
commit
48cc8a308d
|
@ -335,19 +335,21 @@ def checkNullConnection():
|
|||
page, headers = Request.getPage(method="HEAD")
|
||||
if not page and 'Content-Length' in headers:
|
||||
kb.nullConnection = "HEAD"
|
||||
|
||||
infoMsg = "null connection is supported with HEAD header"
|
||||
logger.info(infoMsg)
|
||||
else:
|
||||
page, headers = Request.getPage(auxHeaders={"Range":"bytes=-1"})
|
||||
if page and len(page) == 1 and 'Content-Range' in headers:
|
||||
kb.nullConnection = "Range"
|
||||
|
||||
infoMsg = "null connection is supported with GET header "
|
||||
infoMsg += "'%s'" % kb.nullConnection
|
||||
logger.info(infoMsg)
|
||||
except sqlmapConnectionException, errMsg:
|
||||
errMsg = getUnicode(errMsg)
|
||||
raise sqlmapConnectionException, errMsg
|
||||
|
||||
if kb.nullConnection:
|
||||
infoMsg = "method '%s' seems to be working" % kb.nullConnection
|
||||
logger.info(infoMsg)
|
||||
|
||||
return kb.nullConnection is not None
|
||||
|
||||
def checkConnection():
|
||||
|
|
Loading…
Reference in New Issue
Block a user