mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-15 02:49:03 +00:00
refactoring
This commit is contained in:
@@ -7,7 +7,6 @@ Copyright (c) 2006-2011 sqlmap developers (http://sqlmap.sourceforge.net/)
|
||||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
import logging
|
||||
import threading
|
||||
import time
|
||||
import traceback
|
||||
@@ -34,7 +33,6 @@ from lib.core.data import logger
|
||||
from lib.core.data import queries
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.enums import WARNFLAGS
|
||||
from lib.core.exception import sqlmapConnectionException
|
||||
from lib.core.exception import sqlmapValueException
|
||||
from lib.core.exception import sqlmapThreadException
|
||||
@@ -118,7 +116,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||
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)
|
||||
singleTimeLogMessage(warnMsg)
|
||||
|
||||
if conf.verbose in (1, 2) and not showEta:
|
||||
if isinstance(length, int) and conf.threads > 1:
|
||||
|
||||
@@ -7,7 +7,6 @@ Copyright (c) 2006-2011 sqlmap developers (http://sqlmap.sourceforge.net/)
|
||||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
import logging
|
||||
import random
|
||||
import re
|
||||
import time
|
||||
@@ -34,7 +33,6 @@ from lib.core.data import logger
|
||||
from lib.core.data import queries
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.enums import WARNFLAGS
|
||||
from lib.core.settings import FROM_TABLE
|
||||
from lib.core.settings import UNION_MIN_RESPONSE_CHARS
|
||||
from lib.core.settings import UNION_STDEV_COEFF
|
||||
@@ -216,7 +214,7 @@ def __unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix
|
||||
warnMsg = "please consider usage of --union-char option "
|
||||
warnMsg += "(e.g. --union-char=1) and/or try to force "
|
||||
warnMsg += "back-end DBMS (e.g. --dbms=mysql) to make it work"
|
||||
singleTimeLogMessage(warnMsg, logging.WARN, WARNFLAGS.UNION_APPEARS)
|
||||
singleTimeLogMessage(warnMsg)
|
||||
|
||||
return validPayload, vector
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ Copyright (c) 2006-2011 sqlmap developers (http://sqlmap.sourceforge.net/)
|
||||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
import logging
|
||||
import re
|
||||
import threading
|
||||
import time
|
||||
@@ -34,7 +33,6 @@ from lib.core.data import logger
|
||||
from lib.core.data import queries
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.enums import WARNFLAGS
|
||||
from lib.core.exception import sqlmapConnectionException
|
||||
from lib.core.exception import sqlmapSyntaxException
|
||||
from lib.core.settings import FROM_TABLE
|
||||
@@ -96,7 +94,7 @@ def __oneShotUnionUse(expression, unpack=True):
|
||||
warnMsg = "if the problem persists with 'None' values please try to use "
|
||||
warnMsg += "hidden switch --no-cast (fixing problems with some collation "
|
||||
warnMsg += "issues)"
|
||||
singleTimeLogMessage(warnMsg, logging.WARN, WARNFLAGS.NO_CAST)
|
||||
singleTimeLogMessage(warnMsg)
|
||||
|
||||
return output
|
||||
|
||||
|
||||
Reference in New Issue
Block a user