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

Skip to content

Commit 412ba5c

Browse files
committed
Merge branch 'master' of github.com:sqlmapproject/sqlmap
2 parents 9cfea57 + 295a7a8 commit 412ba5c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/techniques/union/test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from lib.core.settings import MAX_RATIO
3535
from lib.core.settings import MIN_STATISTICAL_RANGE
3636
from lib.core.settings import MIN_UNION_RESPONSES
37+
from lib.core.settings import NULL
3738
from lib.core.settings import ORDER_BY_STEP
3839
from lib.core.unescaper import unescaper
3940
from lib.request.comparison import comparison
@@ -255,14 +256,14 @@ def __unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix
255256
warnMsg = "if UNION based SQL injection is not detected, "
256257
warnMsg += "please consider "
257258

258-
if not conf.uChar and count > 1:
259+
if not conf.uChar and count > 1 and kb.uChar == NULL:
259260
message = "injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n] "
260261
test = readInput(message, default="Y")
261262
if test[0] not in ("y", "Y"):
262263
warnMsg += "usage of option '--union-char' "
263264
warnMsg += "(e.g. --union-char=1) "
264265
else:
265-
kb.uChar = str(randomInt(2))
266+
conf.uChar = kb.uChar = str(randomInt(2))
266267
validPayload, vector = __unionConfirm(comment, place, parameter, prefix, suffix, count)
267268

268269
if not conf.dbms:

0 commit comments

Comments
 (0)