Fixing DeprecationWarning (logger.warn)

This commit is contained in:
Miroslav Stampar
2022-06-22 12:04:34 +02:00
parent 90b444c927
commit df4293473d
99 changed files with 429 additions and 428 deletions

View File

@@ -66,7 +66,7 @@ def tableExists(tableFile, regex=None):
if kb.choices.tableExists is None and not any(_ for _ in kb.injection.data if _ not in (PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED)) and not conf.direct:
warnMsg = "it's not recommended to use '%s' and/or '%s' " % (PAYLOAD.SQLINJECTION[PAYLOAD.TECHNIQUE.TIME], PAYLOAD.SQLINJECTION[PAYLOAD.TECHNIQUE.STACKED])
warnMsg += "for common table existence check"
logger.warn(warnMsg)
logger.warning(warnMsg)
message = "are you sure you want to continue? [y/N] "
kb.choices.tableExists = readInput(message, default='N', boolean=True)
@@ -160,7 +160,7 @@ def tableExists(tableFile, regex=None):
except KeyboardInterrupt:
warnMsg = "user aborted during table existence "
warnMsg += "check. sqlmap will display partial output"
logger.warn(warnMsg)
logger.warning(warnMsg)
clearConsoleLine(True)
dataToStdout("\n")
@@ -169,7 +169,7 @@ def tableExists(tableFile, regex=None):
warnMsg = "no table(s) found"
if conf.db:
warnMsg += " for database '%s'" % conf.db
logger.warn(warnMsg)
logger.warning(warnMsg)
else:
for item in threadData.shared.files:
if conf.db not in kb.data.cachedTables:
@@ -190,7 +190,7 @@ def columnExists(columnFile, regex=None):
if kb.choices.columnExists is None and not any(_ for _ in kb.injection.data if _ not in (PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED)) and not conf.direct:
warnMsg = "it's not recommended to use '%s' and/or '%s' " % (PAYLOAD.SQLINJECTION[PAYLOAD.TECHNIQUE.TIME], PAYLOAD.SQLINJECTION[PAYLOAD.TECHNIQUE.STACKED])
warnMsg += "for common column existence check"
logger.warn(warnMsg)
logger.warning(warnMsg)
message = "are you sure you want to continue? [y/N] "
kb.choices.columnExists = readInput(message, default='N', boolean=True)
@@ -281,7 +281,7 @@ def columnExists(columnFile, regex=None):
except KeyboardInterrupt:
warnMsg = "user aborted during column existence "
warnMsg += "check. sqlmap will display partial output"
logger.warn(warnMsg)
logger.warning(warnMsg)
finally:
kb.bruteMode = False
@@ -290,7 +290,7 @@ def columnExists(columnFile, regex=None):
if not threadData.shared.files:
warnMsg = "no column(s) found"
logger.warn(warnMsg)
logger.warning(warnMsg)
else:
columns = {}
@@ -394,7 +394,7 @@ def fileExists(pathFile):
except KeyboardInterrupt:
warnMsg = "user aborted during file existence "
warnMsg += "check. sqlmap will display partial output"
logger.warn(warnMsg)
logger.warning(warnMsg)
finally:
kb.bruteMode = False
logger.setLevel(popValue())
@@ -404,7 +404,7 @@ def fileExists(pathFile):
if not threadData.shared.files:
warnMsg = "no file(s) found"
logger.warn(warnMsg)
logger.warning(warnMsg)
else:
retVal = threadData.shared.files