mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-15 13:13:46 +03:00
Minor update for an Issue #2
This commit is contained in:
parent
1e238b5a5a
commit
c3d191e626
|
@ -161,12 +161,13 @@ def __randomFillBlankFields(value):
|
|||
message = "do you want to fill blank fields with random values? [Y/n] "
|
||||
test = readInput(message, default="Y")
|
||||
if not test or test[0] in ("y", "Y"):
|
||||
while extractRegexResult(EMPTY_FORM_FIELDS_REGEX, retVal):
|
||||
item = extractRegexResult(EMPTY_FORM_FIELDS_REGEX, retVal)
|
||||
if item[-1] == DEFAULT_GET_POST_DELIMITER:
|
||||
retVal = retVal.replace(item, "%s%s%s" % (item[:-1], randomStr(), DEFAULT_GET_POST_DELIMITER))
|
||||
else:
|
||||
retVal = retVal.replace(item, "%s%s" % (item, randomStr()))
|
||||
for match in re.finditer(EMPTY_FORM_FIELDS_REGEX, retVal):
|
||||
item = match.group("result")
|
||||
if not any(_ in item for _ in IGNORE_PARAMETERS):
|
||||
if item[-1] == DEFAULT_GET_POST_DELIMITER:
|
||||
retVal = retVal.replace(item, "%s%s%s" % (item[:-1], randomStr(), DEFAULT_GET_POST_DELIMITER))
|
||||
else:
|
||||
retVal = retVal.replace(item, "%s%s" % (item, randomStr()))
|
||||
|
||||
return retVal
|
||||
|
||||
|
|
|
@ -455,3 +455,6 @@ MAX_HELP_OPTION_LENGTH = 18
|
|||
|
||||
# Strings for detecting formatting errors
|
||||
FORMAT_EXCEPTION_STRINGS = ("Type mismatch", "Error converting", "Failed to convert", "System.FormatException", "java.lang.NumberFormatException")
|
||||
|
||||
# Regular expression used for extracting ASP.NET View State values
|
||||
VIEWSTATE_REGEX = r'(?P<name>__VIEWSTATE[^"]*)[^>]+value="(?P<name>[^"]+)'
|
||||
|
|
Loading…
Reference in New Issue
Block a user