@@ -351,7 +351,7 @@ def setDbms(dbms):
351351 elif kb .dbms is not None and kb .dbms != dbms :
352352 warnMsg = "there appears to be a high probability that "
353353 warnMsg += "this could be a false positive case"
354- logger .warn (warnMsg )
354+ logger .warning (warnMsg )
355355
356356 msg = "sqlmap previously fingerprinted back-end DBMS as "
357357 msg += "%s. However now it has been fingerprinted " % kb .dbms
@@ -371,7 +371,7 @@ def setDbms(dbms):
371371 break
372372 else :
373373 warnMsg = "invalid value"
374- logger .warn (warnMsg )
374+ logger .warning (warnMsg )
375375
376376 elif kb .dbms is None :
377377 kb .dbms = aliasToDbmsEnum (dbms )
@@ -429,7 +429,7 @@ def setOs(os):
429429 break
430430 else :
431431 warnMsg = "invalid value"
432- logger .warn (warnMsg )
432+ logger .warning (warnMsg )
433433
434434 elif kb .os is None and isinstance (os , six .string_types ):
435435 kb .os = os .capitalize ()
@@ -466,7 +466,7 @@ def setArch():
466466 break
467467 else :
468468 warnMsg = "invalid value. Valid values are 1 and 2"
469- logger .warn (warnMsg )
469+ logger .warning (warnMsg )
470470
471471 return kb .arch
472472
@@ -663,7 +663,7 @@ def paramToDict(place, parameters=None):
663663 warnMsg += "chars/statements from manual SQL injection test(s). "
664664 warnMsg += "Please, always use only valid parameter values "
665665 warnMsg += "so sqlmap could be able to run properly"
666- logger .warn (warnMsg )
666+ logger .warning (warnMsg )
667667
668668 message = "are you really sure that you want to continue (sqlmap could have problems)? [y/N] "
669669
@@ -673,7 +673,7 @@ def paramToDict(place, parameters=None):
673673 warnMsg = "provided value for parameter '%s' is empty. " % parameter
674674 warnMsg += "Please, always use only valid parameter values "
675675 warnMsg += "so sqlmap could be able to run properly"
676- logger .warn (warnMsg )
676+ logger .warning (warnMsg )
677677
678678 if place in (PLACE .POST , PLACE .GET ):
679679 for regex in (r"\A((?:<[^>]+>)+\w+)((?:<[^>]+>)+)\Z" , r"\A([^\w]+.*\w+)([^\w]+)\Z" ):
@@ -738,7 +738,7 @@ def walk(head, current=None):
738738 if len (conf .testParameter ) > 1 :
739739 warnMsg = "provided parameters '%s' " % paramStr
740740 warnMsg += "are not inside the %s" % place
741- logger .warn (warnMsg )
741+ logger .warning (warnMsg )
742742 else :
743743 parameter = conf .testParameter [0 ]
744744
@@ -763,7 +763,7 @@ def walk(head, current=None):
763763 if len (decoded ) > MIN_ENCODED_LEN_CHECK and all (_ in getBytes (string .printable ) for _ in decoded ):
764764 warnMsg = "provided parameter '%s' " % parameter
765765 warnMsg += "appears to be '%s' encoded" % encoding
766- logger .warn (warnMsg )
766+ logger .warning (warnMsg )
767767 break
768768 except :
769769 pass
@@ -814,7 +814,7 @@ def getManualDirectories():
814814 else :
815815 warnMsg = "unable to automatically retrieve the web server "
816816 warnMsg += "document root"
817- logger .warn (warnMsg )
817+ logger .warning (warnMsg )
818818
819819 directories = []
820820
@@ -900,7 +900,7 @@ def getAutoDirectories():
900900 retVal .add (directory )
901901 else :
902902 warnMsg = "unable to automatically parse any web server path"
903- logger .warn (warnMsg )
903+ logger .warning (warnMsg )
904904
905905 return list (retVal )
906906
@@ -1637,7 +1637,7 @@ def parseTargetDirect():
16371637 if remote :
16381638 warnMsg = "direct connection over the network for "
16391639 warnMsg += "%s DBMS is not supported" % dbmsName
1640- logger .warn (warnMsg )
1640+ logger .warning (warnMsg )
16411641
16421642 conf .hostname = "localhost"
16431643 conf .port = 0
@@ -1900,7 +1900,7 @@ def parseUnionPage(page):
19001900 if re .search (r"(?si)\A%s.*%s\Z" % (kb .chars .start , kb .chars .stop ), page ):
19011901 if len (page ) > LARGE_OUTPUT_THRESHOLD :
19021902 warnMsg = "large output detected. This might take a while"
1903- logger .warn (warnMsg )
1903+ logger .warning (warnMsg )
19041904
19051905 data = BigArray ()
19061906 keys = set ()
@@ -2789,7 +2789,7 @@ def wasLastResponseDelayed():
27892789 if len (kb .responseTimes [kb .responseTimeMode ]) < MIN_TIME_RESPONSES :
27902790 warnMsg = "time-based standard deviation method used on a model "
27912791 warnMsg += "with less than %d response times" % MIN_TIME_RESPONSES
2792- logger .warn (warnMsg )
2792+ logger .warning (warnMsg )
27932793
27942794 lowerStdLimit = average (kb .responseTimes [kb .responseTimeMode ]) + TIME_STDEV_COEFF * deviation
27952795 retVal = (threadData .lastQueryDuration >= max (MIN_VALID_DELAYED_RESPONSE , lowerStdLimit ))
@@ -3593,7 +3593,7 @@ def initTechnique(technique=None):
35933593 else :
35943594 warnMsg = "there is no injection data available for technique "
35953595 warnMsg += "'%s'" % enumValueToNameLookup (PAYLOAD .TECHNIQUE , technique )
3596- logger .warn (warnMsg )
3596+ logger .warning (warnMsg )
35973597
35983598 except SqlmapDataException :
35993599 errMsg = "missing data in old session file(s). "
@@ -3744,7 +3744,7 @@ def showHttpErrorCodes():
37443744 if kb .httpErrorCodes :
37453745 warnMsg = "HTTP error codes detected during run:\n "
37463746 warnMsg += ", " .join ("%d (%s) - %d times" % (code , _http_client .responses [code ] if code in _http_client .responses else '?' , count ) for code , count in kb .httpErrorCodes .items ())
3747- logger .warn (warnMsg )
3747+ logger .warning (warnMsg )
37483748 if any ((str (_ ).startswith ('4' ) or str (_ ).startswith ('5' )) and _ != _http_client .INTERNAL_SERVER_ERROR and _ != kb .originalCode for _ in kb .httpErrorCodes ):
37493749 msg = "too many 4xx and/or 5xx HTTP error codes "
37503750 msg += "could mean that some kind of protection is involved (e.g. WAF)"
@@ -3972,7 +3972,7 @@ def createGithubIssue(errMsg, excMsg):
39723972 if closed :
39733973 warnMsg += " and resolved. Please update to the latest "
39743974 warnMsg += "development version from official GitHub repository at '%s'" % GIT_PAGE
3975- logger .warn (warnMsg )
3975+ logger .warning (warnMsg )
39763976 return
39773977 except :
39783978 pass
@@ -4002,7 +4002,7 @@ def createGithubIssue(errMsg, excMsg):
40024002 warnMsg += " ('%s')" % _excMsg
40034003 if "Unauthorized" in warnMsg :
40044004 warnMsg += ". Please update to the latest revision"
4005- logger .warn (warnMsg )
4005+ logger .warning (warnMsg )
40064006
40074007def maskSensitiveData (msg ):
40084008 """
@@ -4395,7 +4395,7 @@ def __init__(self):
43954395
43964396 if not options :
43974397 warnMsg = "mnemonic '%s' can't be resolved" % name
4398- logger .warn (warnMsg )
4398+ logger .warning (warnMsg )
43994399 elif name in options :
44004400 found = name
44014401 debugMsg = "mnemonic '%s' resolved to %s). " % (name , found )
@@ -4404,7 +4404,7 @@ def __init__(self):
44044404 found = sorted (options .keys (), key = len )[0 ]
44054405 warnMsg = "detected ambiguity (mnemonic '%s' can be resolved to any of: %s). " % (name , ", " .join ("'%s'" % key for key in options ))
44064406 warnMsg += "Resolved to shortest of those ('%s')" % found
4407- logger .warn (warnMsg )
4407+ logger .warning (warnMsg )
44084408
44094409 if found :
44104410 found = options [found ]
@@ -4810,7 +4810,7 @@ def checkOldOptions(args):
48104810 warnMsg = "switch/option '%s' is deprecated" % _
48114811 if DEPRECATED_OPTIONS [_ ]:
48124812 warnMsg += " (hint: %s)" % DEPRECATED_OPTIONS [_ ]
4813- logger .warn (warnMsg )
4813+ logger .warning (warnMsg )
48144814
48154815def checkSystemEncoding ():
48164816 """
@@ -4828,7 +4828,7 @@ def checkSystemEncoding():
48284828 logger .critical (errMsg )
48294829
48304830 warnMsg = "temporary switching to charset 'cp1256'"
4831- logger .warn (warnMsg )
4831+ logger .warning (warnMsg )
48324832
48334833 _reload_module (sys )
48344834 sys .setdefaultencoding ("cp1256" )
0 commit comments