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

Skip to content

Commit 6969874

Browse files
committed
Switch --no-cast is incompatible with switch --hex (integer values are not being casted in case of --no-cast --hex which is causing unwanted decodings of returned values)
1 parent 10e6c70 commit 6969874

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

lib/core/option.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,10 @@ def _basicOptionValidation():
19981998
errMsg = "option '--not-string' is incompatible with switch '--null-connection'"
19991999
raise SqlmapSyntaxException(errMsg)
20002000

2001+
if conf.noCast and conf.hexConvert:
2002+
errMsg = "switch '--no-cast' is incompatible with switch '--hex'"
2003+
raise SqlmapSyntaxException(errMsg)
2004+
20012005
if conf.string and conf.notString:
20022006
errMsg = "option '--string' is incompatible with switch '--not-string'"
20032007
raise SqlmapSyntaxException(errMsg)

lib/request/inject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def getValue(expression, blind=True, union=True, error=True, time=True, fromUser
411411

412412
if not kb.testMode and value is None and Backend.getDbms() and conf.dbmsHandler:
413413
warnMsg = "in case of continuous data retrieval problems you are advised to try "
414-
warnMsg += "a switch '--no-cast' and/or switch '--hex'"
414+
warnMsg += "a switch '--no-cast' or switch '--hex'"
415415
singleTimeWarnMessage(warnMsg)
416416

417417
return extractExpectedValue(value, expected)

0 commit comments

Comments
 (0)