Cosmetics

This commit is contained in:
Bernardo Damele 2010-10-19 23:09:30 +00:00
parent 8776db872c
commit 0817d1b78d
3 changed files with 4 additions and 9 deletions

View File

@ -106,10 +106,11 @@ def heuristicCheckSqlInjection(place, parameter, value):
Request.queryPage(payload, place) Request.queryPage(payload, place)
result = kb.lastErrorPage and kb.lastErrorPage[0]==kb.lastRequestUID 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: if result:
infoMsg += "injectable (DBMS: %s)" % kb.htmlFp[-1] infoMsg += "injectable (possible DBMS: %s)" % kb.htmlFp[-1]
logger.info(infoMsg) logger.info(infoMsg)
else: else:
infoMsg += "not injectable" infoMsg += "not injectable"

View File

@ -23,10 +23,8 @@ def getRevisionNumber():
client = pysvn.Client() client = pysvn.Client()
if client.info(curDir): if client.info(curDir):
retVal = client.info(curDir).revision.number retVal = client.info(curDir).revision.number
except ImportError, _: except ImportError, _:
process = execute("svn info %s" % curDir, shell=True, stdout=PIPE, stderr=PIPE) process = execute("svn info %s" % curDir, shell=True, stdout=PIPE, stderr=PIPE)
svnStdout, svnStderr = process.communicate() svnStdout, svnStderr = process.communicate()
if svnStdout: if svnStdout:
@ -41,8 +39,4 @@ def getRevisionNumber():
except ValueError: except ValueError:
retVal = None retVal = None
#if not retVal:
#debugMsg = "sqlmap was not able to retrieve the revision number"
#logger.debug(debugMsg)
return retVal return retVal

View File

@ -30,7 +30,7 @@ def errorTest():
logger.info(infoMsg) logger.info(infoMsg)
randInt = getUnicode(randomInt(1)) 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) result = inject.goError(query)
if result: if result: