Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/core/optiondict.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"safeReqFile": "string",
"safeFreq": "integer",
"skipUrlEncode": "boolean",
"skipXmlEncode": "boolean",
"csrfToken": "string",
"csrfUrl": "string",
"csrfMethod": "string",
Expand Down
3 changes: 3 additions & 0 deletions lib/parse/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ def cmdLineParser(argv=None):
request.add_argument("--skip-urlencode", dest="skipUrlEncode", action="store_true",
help="Skip URL encoding of payload data")

request.add_argument("--skip-xml-encode", dest="skipXmlEncode", action="store_true",
help="Skip HTML encoding of payload data for SOAP/XML")

request.add_argument("--csrf-token", dest="csrfToken",
help="Parameter used to hold anti-CSRF token")

Expand Down
2 changes: 1 addition & 1 deletion lib/request/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
logger.log(CUSTOM_LOGGING.PAYLOAD, safecharencode(payload.replace('\\', BOUNDARY_BACKSLASH_MARKER)).replace(BOUNDARY_BACKSLASH_MARKER, '\\'))

if place == PLACE.CUSTOM_POST and kb.postHint:
if kb.postHint in (POST_HINT.SOAP, POST_HINT.XML):
if kb.postHint in (POST_HINT.SOAP, POST_HINT.XML) and not conf.skipXmlEncode:
# payloads in SOAP/XML should have chars > and < replaced
# with their HTML encoded counterparts
payload = payload.replace("&#", SAFE_HEX_MARKER)
Expand Down
4 changes: 4 additions & 0 deletions sqlmap.conf
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ safeFreq = 0
# Valid: True or False
skipUrlEncode = False

# Skip HTML encoding of payload data for SOAP/XML.
# Valid: True or False
skipXmlEncode = False

# Parameter used to hold anti-CSRF token.
csrfToken =

Expand Down