Skip to content

Commit 9ca7b3e

Browse files
committed
Implementation for an Issue sqlmapproject#194
1 parent d175dec commit 9ca7b3e

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

lib/controller/checks.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,12 @@ def checkSqlInjection(place, parameter, value):
281281
# Parse boundary's <prefix>, <suffix> and <ptype>
282282
prefix = boundary.prefix if boundary.prefix else ""
283283
suffix = boundary.suffix if boundary.suffix else ""
284+
285+
# Options --prefix/--suffix have a higher priority (if set by user)
286+
prefix = conf.prefix if conf.prefix is not None else prefix
287+
suffix = conf.suffix if conf.suffix is not None else suffix
288+
comment = None if conf.suffix is not None else comment
289+
284290
ptype = boundary.ptype
285291

286292
# If the previous injections succeeded, we know which prefix,

lib/core/option.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -958,15 +958,6 @@ def __setSafeUrl():
958958
raise sqlmapSyntaxException, errMsg
959959

960960
def __setPrefixSuffix():
961-
if conf.prefix is not None and conf.suffix is None:
962-
errMsg = "you specified the payload prefix, but did not provide "
963-
errMsg += "the payload suffix"
964-
raise sqlmapSyntaxException, errMsg
965-
elif conf.prefix is None and conf.suffix is not None:
966-
errMsg = "you specified the payload suffix, but did not provide "
967-
errMsg += "the payload prefix"
968-
raise sqlmapSyntaxException, errMsg
969-
970961
if conf.prefix is not None and conf.suffix is not None:
971962
# Create a custom boundary object for user's supplied prefix
972963
# and suffix

0 commit comments

Comments
 (0)