More code cleanup

This commit is contained in:
Bernardo Damele
2011-01-15 23:11:36 +00:00
parent 4a35f598b8
commit d3a28124b1
4 changed files with 13 additions and 55 deletions

View File

@@ -433,9 +433,9 @@ def checkSqlInjection(place, parameter, value):
injection.data[stype].matchRatio = kb.matchRatio
injection.conf.textOnly = conf.textOnly
injection.conf.string = conf.string
injection.conf.regexp = conf.regexp
injection.conf.timeSec = conf.timeSec
injection.conf.string = conf.string
injection.conf.regexp = conf.regexp
injection.conf.timeSec = conf.timeSec
if hasattr(test, "details"):
for detailKey, detailValue in test.details.items():

View File

@@ -380,11 +380,13 @@ def start():
if not conf.realTest:
errMsg = "all parameters are not injectable, try "
errMsg += "a higher --level/--risk to use more tests"
if not conf.textOnly and kb.originalPage:
percent = (1.0 * len(kb.originalPage) / len(getFilteredPageContent(kb.originalPage)))
errMsg += " and/or --text-only switch if the target page "
errMsg += "has a low percentage of textual content "
errMsg += "(%.2f%% of page content is text)" % percent
raise sqlmapNotVulnerableException, errMsg
else:
errMsg = "it seems that all parameters are not injectable"