Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 64a862e

Browse files
committed
minor usability update
1 parent faf7814 commit 64a862e

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

lib/core/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ class WARNFLAGS:
106106
PIVOT_LIMIT = 'pivotLimit'
107107
TIME_UNRECOVERED = 'timeUnrecovered'
108108
SINGLE_THREAD = 'singleThread'
109+
UNION_APPEARS = 'unionAppears'
109110

110111
class EXPECTED:
111112
BOOL = "bool"

lib/techniques/inband/union/test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
See the file 'doc/COPYING' for copying permission
88
"""
99

10+
import logging
1011
import random
1112
import re
1213
import time
@@ -24,6 +25,7 @@
2425
from lib.core.common import pushValue
2526
from lib.core.common import randomStr
2627
from lib.core.common import removeReflectiveValues
28+
from lib.core.common import singleTimeLogMessage
2729
from lib.core.common import stdev
2830
from lib.core.common import wasLastRequestDBMSError
2931
from lib.core.data import conf
@@ -32,6 +34,7 @@
3234
from lib.core.data import queries
3335
from lib.core.enums import DBMS
3436
from lib.core.enums import PAYLOAD
37+
from lib.core.enums import WARNFLAGS
3538
from lib.core.settings import FROM_TABLE
3639
from lib.core.settings import UNION_MIN_RESPONSE_CHARS
3740
from lib.core.settings import UNION_STDEV_COEFF
@@ -211,8 +214,9 @@ def __unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix
211214

212215
if not all([validPayload, vector]) and not conf.uChar:
213216
warnMsg = "please consider usage of --union-char option "
214-
warnMsg += "(e.g. --union-char=1) to make it work"
215-
logger.warn(warnMsg)
217+
warnMsg += "(e.g. --union-char=1) and/or try to force "
218+
warnMsg += "back-end DBMS (e.g. --dbms=mysql) to make it work"
219+
singleTimeLogMessage(warnMsg, logging.WARN, WARNFLAGS.UNION_APPEARS)
216220

217221
return validPayload, vector
218222

0 commit comments

Comments
 (0)