Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 48cc8a3

Browse files
committed
More verbose messages on successful --null-connection
1 parent 8883918 commit 48cc8a3

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/controller/checks.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,19 +335,21 @@ def checkNullConnection():
335335
page, headers = Request.getPage(method="HEAD")
336336
if not page and 'Content-Length' in headers:
337337
kb.nullConnection = "HEAD"
338+
339+
infoMsg = "null connection is supported with HEAD header"
340+
logger.info(infoMsg)
338341
else:
339342
page, headers = Request.getPage(auxHeaders={"Range":"bytes=-1"})
340343
if page and len(page) == 1 and 'Content-Range' in headers:
341344
kb.nullConnection = "Range"
342345

346+
infoMsg = "null connection is supported with GET header "
347+
infoMsg += "'%s'" % kb.nullConnection
348+
logger.info(infoMsg)
343349
except sqlmapConnectionException, errMsg:
344350
errMsg = getUnicode(errMsg)
345351
raise sqlmapConnectionException, errMsg
346352

347-
if kb.nullConnection:
348-
infoMsg = "method '%s' seems to be working" % kb.nullConnection
349-
logger.info(infoMsg)
350-
351353
return kb.nullConnection is not None
352354

353355
def checkConnection():

0 commit comments

Comments
 (0)