mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-06 14:13:15 +03:00
Minor cleanup
This commit is contained in:
parent
2fbd05c98f
commit
8865fe69d7
|
@ -467,8 +467,8 @@ VIEWSTATE_REGEX = r'(?P<name>__VIEWSTATE[^"]*)[^>]+value="(?P<name>[^"]+)'
|
||||||
# Number of rows to generate inside the full union test for limited output (mustn't be too large to prevent payload length problems)
|
# Number of rows to generate inside the full union test for limited output (mustn't be too large to prevent payload length problems)
|
||||||
LIMITED_ROWS_TEST_NUMBER = 15
|
LIMITED_ROWS_TEST_NUMBER = 15
|
||||||
|
|
||||||
# Regular expression for soap message recognition
|
# Regular expression for SOAP-like POST data
|
||||||
SOAP_RECOGNITION_REGEX = r"(?s)\A(<\?xml[^>]+>)?\s*<([^> ]+)( [^>]+)?>.+</\2"
|
SOAP_RECOGNITION_REGEX = r"(?s)\A(<\?xml[^>]+>)?\s*<([^> ]+)( [^>]+)?>.+</\2.*>\s*\Z"
|
||||||
|
|
||||||
# Regular expressing used for detecting JSON-like POST data
|
# Regular expressing used for detecting JSON-like POST data
|
||||||
JSON_RECOGNITION_REGEX = r'(?s)\A\s*\{.*"[^"]+"\s*:\s*("[^"]+"|\d+).*\}\s*\Z'
|
JSON_RECOGNITION_REGEX = r'(?s)\A\s*\{.*"[^"]+"\s*:\s*("[^"]+"|\d+).*\}\s*\Z'
|
||||||
|
|
|
@ -683,16 +683,6 @@ class Connect:
|
||||||
|
|
||||||
get = urlencode(get, limit=True)
|
get = urlencode(get, limit=True)
|
||||||
if post:
|
if post:
|
||||||
if conf.skipUrlEncode is None:
|
|
||||||
_ = (post or "").strip()
|
|
||||||
if _.startswith('<') and _.endswith('>'):
|
|
||||||
msg = "provided POST data looks "
|
|
||||||
msg += "like it's in XML format. "
|
|
||||||
msg += "Do you want to turn off URL encoding "
|
|
||||||
msg += "which is usually causing problems "
|
|
||||||
msg += "in this kind of situations? [Y/n]"
|
|
||||||
skipUrlEncode = conf.skipUrlEncode = readInput(msg, default="Y").upper() != "N"
|
|
||||||
|
|
||||||
if place not in (PLACE.POST, PLACE.CUSTOM_POST) and hasattr(post, UNENCODED_ORIGINAL_VALUE):
|
if place not in (PLACE.POST, PLACE.CUSTOM_POST) and hasattr(post, UNENCODED_ORIGINAL_VALUE):
|
||||||
post = getattr(post, UNENCODED_ORIGINAL_VALUE)
|
post = getattr(post, UNENCODED_ORIGINAL_VALUE)
|
||||||
elif not skipUrlEncode and kb.postHint not in POST_HINT_CONTENT_TYPES.keys():
|
elif not skipUrlEncode and kb.postHint not in POST_HINT_CONTENT_TYPES.keys():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user