From 3d01890147c5737e504b5bd2d5d45a425e8d365a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 27 Dec 2012 21:15:44 +0100 Subject: [PATCH] Patch for an Issue #56 (full target url is now being written to a output .CSV file in multi target mode) --- lib/controller/controller.py | 3 ++- lib/core/common.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 4a5072df0..160a3d719 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -29,6 +29,7 @@ from lib.core.common import intersect from lib.core.common import parseTargetUrl from lib.core.common import randomStr from lib.core.common import readInput +from lib.core.common import safeCSValue from lib.core.common import showHttpErrorCodes from lib.core.common import urlencode from lib.core.common import urldecode @@ -220,7 +221,7 @@ def _saveToResultsFile(): for key, value in results.items(): place, parameter = key - line = "%s,%s,%s,%s%s" % (conf.url, place, parameter, "".join(map(lambda x: techniques[x][0].upper(), sorted(value))), os.linesep) + line = "%s,%s,%s,%s%s" % (safeCSValue(kb.originalUrls.get(conf.url) or conf.url), place, parameter, "".join(map(lambda x: techniques[x][0].upper(), sorted(value))), os.linesep) conf.resultsFP.writelines(line) if not results: diff --git a/lib/core/common.py b/lib/core/common.py index c1ec04a6d..ca9bdbcd6 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1108,8 +1108,7 @@ def parseTargetUrl(): conf.httpHeaders = filter(lambda (key, value): key != HTTPHEADER.HOST, conf.httpHeaders) conf.httpHeaders.append((HTTPHEADER.HOST, getHostHeader(conf.url))) - if originalUrl != conf.url: - kb.originalUrls[conf.url] = originalUrl + kb.originalUrls[conf.url] = originalUrl def expandAsteriskForColumns(expression): """