From 05b2a338fec34bae157b10e1caea41cf36d2e279 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 14 Jan 2011 16:12:44 +0000 Subject: [PATCH] cosmetics --- lib/controller/controller.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 1be14def4..0e1cf4143 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -20,6 +20,7 @@ from lib.controller.checks import checkNullConnection from lib.controller.checks import heuristicCheckSqlInjection from lib.controller.checks import simpletonCheckSqlInjection from lib.core.agent import agent +from lib.core.common import getFilteredPageContent from lib.core.common import getUnicode from lib.core.common import paramToDict from lib.core.common import parseTargetUrl @@ -379,11 +380,16 @@ def start(): if len(kb.injections) == 0 or (len(kb.injections) == 1 and kb.injections[0].place is None): if not conf.realTest: errMsg = "all parameters are not injectable, try " - errMsg += "a higher --level/--risk and/or --text-only switch" + 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" - raise sqlmapNotVulnerableException, errMsg + raise sqlmapNotVulnerableException, errMsg else: # Flush the flag kb.testMode = False