mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
got rid of unnecessary output for API - #297
This commit is contained in:
parent
4428ad5345
commit
e03010f48b
|
@ -156,7 +156,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
warnMsg += "usage of option '--threads' for faster data retrieval"
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
if conf.verbose in (1, 2) and not showEta:
|
||||
if conf.verbose in (1, 2) and not showEta and not hasattr(conf, "api"):
|
||||
if isinstance(length, int) and conf.threads > 1:
|
||||
dataToStdout("[%s] [INFO] retrieved: %s" % (time.strftime("%X"), "_" * min(length, conf.progressWidth)))
|
||||
dataToStdout("\r[%s] [INFO] retrieved: " % time.strftime("%X"))
|
||||
|
@ -430,7 +430,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
if (endCharIndex - startCharIndex == conf.progressWidth) and (endCharIndex < length - 1):
|
||||
output = output[:-2] + '..'
|
||||
|
||||
if conf.verbose in (1, 2) and not showEta:
|
||||
if conf.verbose in (1, 2) and not showEta and not hasattr(conf, "api"):
|
||||
_ = count - firstChar
|
||||
output += '_' * (min(length, conf.progressWidth) - len(output))
|
||||
status = ' %d/%d (%d%%)' % (_, length, round(100.0 * _ / length))
|
||||
|
@ -460,7 +460,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
finalValue = "".join(value)
|
||||
infoMsg = "\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), filterControlChars(finalValue))
|
||||
|
||||
if conf.verbose in (1, 2) and not showEta and infoMsg:
|
||||
if conf.verbose in (1, 2) and not showEta and infoMsg and not hasattr(conf, "api"):
|
||||
dataToStdout(infoMsg)
|
||||
|
||||
# No multi-threading (--threads = 1)
|
||||
|
@ -566,11 +566,11 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
elif partialValue:
|
||||
hashDBWrite(expression, "%s%s" % (PARTIAL_VALUE_MARKER if not conf.hexConvert else PARTIAL_HEX_VALUE_MARKER, partialValue))
|
||||
|
||||
if conf.hexConvert and not abortedFlag:
|
||||
if conf.hexConvert and not abortedFlag and not hasattr(conf, "api"):
|
||||
infoMsg = "\r[%s] [INFO] retrieved: %s %s\n" % (time.strftime("%X"), filterControlChars(finalValue), " " * retrievedLength)
|
||||
dataToStdout(infoMsg)
|
||||
else:
|
||||
if conf.verbose in (1, 2) or showEta:
|
||||
if conf.verbose in (1, 2) or showEta and not hasattr(conf, "api"):
|
||||
dataToStdout("\n")
|
||||
|
||||
if (conf.verbose in (1, 2) and showEta) or conf.verbose >= 3:
|
||||
|
|
|
@ -99,7 +99,7 @@ def tableExists(tableFile, regex=None):
|
|||
threadData.shared.value.append(table)
|
||||
threadData.shared.unique.add(table.lower())
|
||||
|
||||
if conf.verbose in (1, 2):
|
||||
if conf.verbose in (1, 2) and not hasattr(conf, "api"):
|
||||
clearConsoleLine(True)
|
||||
infoMsg = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), table)
|
||||
dataToStdout(infoMsg, True)
|
||||
|
@ -195,7 +195,7 @@ def columnExists(columnFile, regex=None):
|
|||
if result:
|
||||
threadData.shared.value.append(column)
|
||||
|
||||
if conf.verbose in (1, 2):
|
||||
if conf.verbose in (1, 2) and not hasattr(conf, "api"):
|
||||
clearConsoleLine(True)
|
||||
infoMsg = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), column)
|
||||
dataToStdout(infoMsg, True)
|
||||
|
|
Loading…
Reference in New Issue
Block a user