(value)
| 195 | logger.warning(warnMsg) |
| 196 | |
| 197 | def _randomFillBlankFields(value): |
| 198 | retVal = value |
| 199 | |
| 200 | if extractRegexResult(EMPTY_FORM_FIELDS_REGEX, value): |
| 201 | message = "do you want to fill blank fields with random values? [Y/n] " |
| 202 | |
| 203 | if readInput(message, default='Y', boolean=True): |
| 204 | for match in re.finditer(EMPTY_FORM_FIELDS_REGEX, retVal): |
| 205 | item = match.group("result") |
| 206 | if not any(_ in item for _ in IGNORE_PARAMETERS) and not re.search(ASP_NET_CONTROL_REGEX, item): |
| 207 | newValue = randomStr() if not re.search(r"^id|id$", item, re.I) else randomInt() |
| 208 | if item[-1] == DEFAULT_GET_POST_DELIMITER: |
| 209 | retVal = retVal.replace(item, "%s%s%s" % (item[:-1], newValue, DEFAULT_GET_POST_DELIMITER)) |
| 210 | else: |
| 211 | retVal = retVal.replace(item, "%s%s" % (item, newValue)) |
| 212 | |
| 213 | return retVal |
| 214 | |
| 215 | def _saveToHashDB(): |
| 216 | injections = hashDBRetrieve(HASHDB_KEYS.KB_INJECTIONS, True) |
no test coverage detected
searching dependent graphs…