mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
user friendliness uber 9000
This commit is contained in:
@@ -101,6 +101,7 @@ class WARNFLAGS:
|
|||||||
THREADS = 'threads'
|
THREADS = 'threads'
|
||||||
PIVOT_LIMIT = 'pivotLimit'
|
PIVOT_LIMIT = 'pivotLimit'
|
||||||
TIME_UNRECOVERED = 'timeUnrecovered'
|
TIME_UNRECOVERED = 'timeUnrecovered'
|
||||||
|
SINGLE_THREAD = 'singleThread'
|
||||||
|
|
||||||
class EXPECTED:
|
class EXPECTED:
|
||||||
BOOL = "bool"
|
BOOL = "bool"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ Copyright (c) 2006-2011 sqlmap developers (http://sqlmap.sourceforge.net/)
|
|||||||
See the file 'doc/COPYING' for copying permission
|
See the file 'doc/COPYING' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
@@ -25,6 +26,7 @@ from lib.core.common import pushValue
|
|||||||
from lib.core.common import readInput
|
from lib.core.common import readInput
|
||||||
from lib.core.common import replaceNewlineTabs
|
from lib.core.common import replaceNewlineTabs
|
||||||
from lib.core.common import safeStringFormat
|
from lib.core.common import safeStringFormat
|
||||||
|
from lib.core.common import singleTimeLogMessage
|
||||||
from lib.core.common import unhandledExceptionMessage
|
from lib.core.common import unhandledExceptionMessage
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
from lib.core.data import kb
|
from lib.core.data import kb
|
||||||
@@ -32,6 +34,7 @@ from lib.core.data import logger
|
|||||||
from lib.core.data import queries
|
from lib.core.data import queries
|
||||||
from lib.core.enums import DBMS
|
from lib.core.enums import DBMS
|
||||||
from lib.core.enums import PAYLOAD
|
from lib.core.enums import PAYLOAD
|
||||||
|
from lib.core.enums import WARNFLAGS
|
||||||
from lib.core.exception import sqlmapConnectionException
|
from lib.core.exception import sqlmapConnectionException
|
||||||
from lib.core.exception import sqlmapValueException
|
from lib.core.exception import sqlmapValueException
|
||||||
from lib.core.exception import sqlmapThreadException
|
from lib.core.exception import sqlmapThreadException
|
||||||
@@ -112,6 +115,11 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
numThreads = 1
|
numThreads = 1
|
||||||
|
|
||||||
|
if conf.threads == 1 and not timeBasedCompare:
|
||||||
|
warnMsg = "running in a single-thread mode. please consider usage of "
|
||||||
|
warnMsg += "--threads option to declare higher number of threads"
|
||||||
|
singleTimeLogMessage(warnMsg, logging.WARN, WARNFLAGS.SINGLE_THREAD)
|
||||||
|
|
||||||
if conf.verbose in (1, 2) and not showEta:
|
if conf.verbose in (1, 2) and not showEta:
|
||||||
if isinstance(length, int) and conf.threads > 1:
|
if isinstance(length, int) and conf.threads > 1:
|
||||||
dataToStdout("[%s] [INFO] retrieved: %s" % (time.strftime("%X"), "_" * min(length, conf.progressWidth)))
|
dataToStdout("[%s] [INFO] retrieved: %s" % (time.strftime("%X"), "_" * min(length, conf.progressWidth)))
|
||||||
|
|||||||
Reference in New Issue
Block a user