cosmetics regarding --forms

This commit is contained in:
Miroslav Stampar 2010-11-15 11:50:33 +00:00
parent 36c544f440
commit c25c017c08
2 changed files with 9 additions and 2 deletions

View File

@ -140,7 +140,11 @@ def start():
if conf.multipleTargets: if conf.multipleTargets:
hostCount += 1 hostCount += 1
message = "%s %d:\n%s %s" % ("form" if conf.forms else "url", hostCount, conf.method or HTTPMETHOD.GET, targetUrl) if conf.forms:
name = kb.formNames[(targetUrl, targetMethod, targetData, targetCookie)]
message = "[#%d] %s:\n%s %s" % (hostCount, "form%s" % (" '%s'" % name if name else ""), conf.method or HTTPMETHOD.GET, targetUrl)
else:
message = "%s %d:\n%s %s" % ("url", hostCount, conf.method or HTTPMETHOD.GET, targetUrl)
if conf.cookie: if conf.cookie:
message += "\nCookie: %s" % conf.cookie message += "\nCookie: %s" % conf.cookie

View File

@ -361,7 +361,9 @@ def __findPageForms():
method = request.get_method() method = request.get_method()
data = request.get_data() if request.has_data() else None data = request.get_data() if request.has_data() else None
kb.targetUrls.add((url, method, data, conf.cookie)) target = (url, method, data, conf.cookie)
kb.targetUrls.add(target)
kb.formNames[target] = form.name
def __setMetasploit(): def __setMetasploit():
if not conf.osPwn and not conf.osSmb and not conf.osBof: if not conf.osPwn and not conf.osSmb and not conf.osBof:
@ -1093,6 +1095,7 @@ def __setKnowledgeBaseAttributes():
kb.docRoot = None kb.docRoot = None
kb.dynamicMarkings = [] kb.dynamicMarkings = []
kb.errorTest = None kb.errorTest = None
kb.formNames = advancedDict()
kb.headersCount = 0 kb.headersCount = 0
kb.headersFp = {} kb.headersFp = {}
kb.hintValue = None kb.hintValue = None