File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020from lib .controller .checks import heuristicCheckSqlInjection
2121from lib .controller .checks import simpletonCheckSqlInjection
2222from lib .core .agent import agent
23+ from lib .core .common import getFilteredPageContent
2324from lib .core .common import getUnicode
2425from lib .core .common import paramToDict
2526from lib .core .common import parseTargetUrl
@@ -379,11 +380,16 @@ def start():
379380 if len (kb .injections ) == 0 or (len (kb .injections ) == 1 and kb .injections [0 ].place is None ):
380381 if not conf .realTest :
381382 errMsg = "all parameters are not injectable, try "
382- errMsg += "a higher --level/--risk and/or --text-only switch"
383+ errMsg += "a higher --level/--risk to use more tests"
384+ if not conf .textOnly and kb .originalPage :
385+ percent = (1.0 * len (kb .originalPage ) / len (getFilteredPageContent (kb .originalPage )))
386+ errMsg += " and/or --text-only switch if the target page "
387+ errMsg += "has a low percentage of textual content "
388+ errMsg += "(%.2f%% of page content is text)" % percent
383389 raise sqlmapNotVulnerableException , errMsg
384390 else :
385391 errMsg = "it seems that all parameters are not injectable"
386- raise sqlmapNotVulnerableException , errMsg
392+ raise sqlmapNotVulnerableException , errMsg
387393 else :
388394 # Flush the flag
389395 kb .testMode = False
You can’t perform that action at this time.
0 commit comments