From 0817d1b78d76703cbea569d24d89c5241cec3bc0 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Tue, 19 Oct 2010 23:09:30 +0000 Subject: [PATCH] Cosmetics --- lib/controller/checks.py | 5 +++-- lib/core/revision.py | 6 ------ lib/techniques/error/error.py | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 23dccd381..cf5e22ff4 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -106,10 +106,11 @@ def heuristicCheckSqlInjection(place, parameter, value): Request.queryPage(payload, place) result = kb.lastErrorPage and kb.lastErrorPage[0]==kb.lastRequestUID - infoMsg = "(error based) heuristics show that %s parameter '%s' is " % (place, parameter) + infoMsg = "(error based) heuristics shows that %s " % place + infoMsg += "parameter '%s' is " % parameter if result: - infoMsg += "injectable (DBMS: %s)" % kb.htmlFp[-1] + infoMsg += "injectable (possible DBMS: %s)" % kb.htmlFp[-1] logger.info(infoMsg) else: infoMsg += "not injectable" diff --git a/lib/core/revision.py b/lib/core/revision.py index 3b6fe562d..ba5aa0643 100644 --- a/lib/core/revision.py +++ b/lib/core/revision.py @@ -23,10 +23,8 @@ def getRevisionNumber(): client = pysvn.Client() if client.info(curDir): retVal = client.info(curDir).revision.number - except ImportError, _: process = execute("svn info %s" % curDir, shell=True, stdout=PIPE, stderr=PIPE) - svnStdout, svnStderr = process.communicate() if svnStdout: @@ -41,8 +39,4 @@ def getRevisionNumber(): except ValueError: retVal = None - #if not retVal: - #debugMsg = "sqlmap was not able to retrieve the revision number" - #logger.debug(debugMsg) - return retVal diff --git a/lib/techniques/error/error.py b/lib/techniques/error/error.py index f4933e64d..7a5b9cf1f 100644 --- a/lib/techniques/error/error.py +++ b/lib/techniques/error/error.py @@ -30,7 +30,7 @@ def errorTest(): logger.info(infoMsg) randInt = getUnicode(randomInt(1)) - query = queries[kb.dbms].case % ("%s=%s" % (randInt, randInt)) + query = queries[kb.dbms].case % ("%s=%s" % (randInt, randInt)) result = inject.goError(query) if result: