minor update related to the last commit

This commit is contained in:
Miroslav Stampar 2011-04-01 22:19:42 +00:00
parent cd7e4f5afc
commit bbd4c128b0
2 changed files with 5 additions and 1 deletions

View File

@ -221,7 +221,7 @@ def start():
if not test or test[0] in ("y", "Y"):
if conf.method == HTTPMETHOD.POST:
message = "Edit POST data [default: %s]%s: " % (urlencode(conf.data) if conf.data else "", " (Warning: blank fields detected)" if conf.data and extractRegexResult(EMPTY_FORM_FIELDS_REGEX, conf.data) else "")
message = "Edit POST data [default: %s]%s: " % (urlencode(conf.data) if conf.data else "None", " (Warning: blank fields detected)" if conf.data and extractRegexResult(EMPTY_FORM_FIELDS_REGEX, conf.data) else "")
conf.data = readInput(message, default=conf.data)
if extractRegexResult(EMPTY_FORM_FIELDS_REGEX, conf.data):
message = "do you want to fill blank fields with random values? [Y/n] "

View File

@ -464,6 +464,10 @@ def __findPageForms():
url = urldecode(request.get_full_url(), kb.pageEncoding)
method = request.get_method()
data = urldecode(request.get_data(), kb.pageEncoding) if request.has_data() else None
if not data and method and method.upper() == HTTPMETHOD.POST:
debugMsg = "invalid POST form with blank data detected"
logger.debug(debugMsg)
continue
target = (url, method, data, conf.cookie)
kb.targetUrls.add(target)
kb.formNames.append(target)