77
88import copy
99import httplib
10+ import logging
1011import os
1112import random
1213import re
@@ -629,11 +630,12 @@ def genCmpPayload():
629630 Backend .forceDbms (kb .dbmsFilter [0 ])
630631 elif not Backend .getIdentifiedDbms ():
631632 if kb .heuristicDbms is None :
632- warnMsg = "using unescaped version of the test "
633- warnMsg += "because of zero knowledge of the "
634- warnMsg += "back-end DBMS. You can try to "
635- warnMsg += "explicitly set it with option '--dbms'"
636- singleTimeWarnMessage (warnMsg )
633+ if kb .heuristicTest == HEURISTIC_TEST .POSITIVE or injection .data :
634+ warnMsg = "using unescaped version of the test "
635+ warnMsg += "because of zero knowledge of the "
636+ warnMsg += "back-end DBMS. You can try to "
637+ warnMsg += "explicitly set it with option '--dbms'"
638+ singleTimeWarnMessage (warnMsg )
637639 else :
638640 Backend .forceDbms (kb .heuristicDbms )
639641
@@ -1143,16 +1145,16 @@ def checkDynamicContent(firstPage, secondPage):
11431145 count += 1
11441146
11451147 if count > conf .retries :
1146- warnMsg = "target URL is too dynamic. "
1148+ warnMsg = "target URL content appears to be too dynamic. "
11471149 warnMsg += "Switching to '--text-only' "
11481150 logger .warn (warnMsg )
11491151
11501152 conf .textOnly = True
11511153 return
11521154
1153- warnMsg = "target URL is heavily dynamic"
1154- warnMsg += ". sqlmap is going to retry the request"
1155- logger . critical (warnMsg )
1155+ warnMsg = "target URL content appears to be heavily dynamic. "
1156+ warnMsg += "sqlmap is going to retry the request(s) "
1157+ singleTimeLogMessage (warnMsg , logging . CRITICAL )
11561158
11571159 secondPage , _ , _ = Request .queryPage (content = True )
11581160 findDynamicContent (firstPage , secondPage )
@@ -1168,7 +1170,7 @@ def checkStability():
11681170 like for instance string matching (--string).
11691171 """
11701172
1171- infoMsg = "testing if the target URL is stable"
1173+ infoMsg = "testing if the target URL content is stable"
11721174 logger .info (infoMsg )
11731175
11741176 firstPage = kb .originalPage # set inside checkConnection()
@@ -1186,7 +1188,7 @@ def checkStability():
11861188
11871189 if kb .pageStable :
11881190 if firstPage :
1189- infoMsg = "target URL is stable"
1191+ infoMsg = "target URL content is stable"
11901192 logger .info (infoMsg )
11911193 else :
11921194 errMsg = "there was an error checking the stability of page "
@@ -1196,12 +1198,11 @@ def checkStability():
11961198 logger .error (errMsg )
11971199
11981200 else :
1199- warnMsg = "target URL is not stable. sqlmap will base the page "
1201+ warnMsg = "target URL content is not stable. sqlmap will base the page "
12001202 warnMsg += "comparison on a sequence matcher. If no dynamic nor "
12011203 warnMsg += "injectable parameters are detected, or in case of "
12021204 warnMsg += "junk results, refer to user's manual paragraph "
1203- warnMsg += "'Page comparison' and provide a string or regular "
1204- warnMsg += "expression to match on"
1205+ warnMsg += "'Page comparison'"
12051206 logger .warn (warnMsg )
12061207
12071208 message = "how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] "
0 commit comments