minor usability update

This commit is contained in:
Miroslav Stampar 2011-06-03 14:04:02 +00:00
parent faf7814869
commit 64a862ed58
2 changed files with 7 additions and 2 deletions

View File

@ -106,6 +106,7 @@ class WARNFLAGS:
PIVOT_LIMIT = 'pivotLimit' PIVOT_LIMIT = 'pivotLimit'
TIME_UNRECOVERED = 'timeUnrecovered' TIME_UNRECOVERED = 'timeUnrecovered'
SINGLE_THREAD = 'singleThread' SINGLE_THREAD = 'singleThread'
UNION_APPEARS = 'unionAppears'
class EXPECTED: class EXPECTED:
BOOL = "bool" BOOL = "bool"

View File

@ -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 random import random
import re import re
import time import time
@ -24,6 +25,7 @@ from lib.core.common import popValue
from lib.core.common import pushValue from lib.core.common import pushValue
from lib.core.common import randomStr from lib.core.common import randomStr
from lib.core.common import removeReflectiveValues from lib.core.common import removeReflectiveValues
from lib.core.common import singleTimeLogMessage
from lib.core.common import stdev from lib.core.common import stdev
from lib.core.common import wasLastRequestDBMSError from lib.core.common import wasLastRequestDBMSError
from lib.core.data import conf from lib.core.data import conf
@ -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.settings import FROM_TABLE from lib.core.settings import FROM_TABLE
from lib.core.settings import UNION_MIN_RESPONSE_CHARS from lib.core.settings import UNION_MIN_RESPONSE_CHARS
from lib.core.settings import UNION_STDEV_COEFF from lib.core.settings import UNION_STDEV_COEFF
@ -211,8 +214,9 @@ def __unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix
if not all([validPayload, vector]) and not conf.uChar: if not all([validPayload, vector]) and not conf.uChar:
warnMsg = "please consider usage of --union-char option " warnMsg = "please consider usage of --union-char option "
warnMsg += "(e.g. --union-char=1) to make it work" warnMsg += "(e.g. --union-char=1) and/or try to force "
logger.warn(warnMsg) warnMsg += "back-end DBMS (e.g. --dbms=mysql) to make it work"
singleTimeLogMessage(warnMsg, logging.WARN, WARNFLAGS.UNION_APPEARS)
return validPayload, vector return validPayload, vector