From 9526f0c4c2c7965cf800167711ded571438971b9 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 17 Mar 2011 12:35:40 +0000 Subject: [PATCH] Minor layout adjustments --- lib/request/connect.py | 5 +++-- lib/request/redirecthandler.py | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/request/connect.py b/lib/request/connect.py index 45ae3f7fa..c31eb1009 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -297,7 +297,7 @@ class Connect: if conf.verbose <= 5: responseMsg += getUnicode(logHeaders) elif conf.verbose > 5: - responseMsg += "%s\n%s\n" % (logHeaders, page) + responseMsg += "%s\n\n%s\n" % (logHeaders, page) logger.log(7, responseMsg) @@ -365,12 +365,13 @@ class Connect: responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, status) if responseHeaders: logHeaders = "\n".join(["%s: %s" % (key.capitalize() if isinstance(key, basestring) else key, getUnicode(value)) for (key, value) in responseHeaders.items()]) + logHTTPTraffic(requestMsg, "%s%s\n\n%s" % (responseMsg, logHeaders, page if isinstance(page, unicode) else getUnicode(page))) if conf.verbose <= 5: responseMsg += getUnicode(logHeaders) elif conf.verbose > 5: - responseMsg += "%s\n%s\n" % (logHeaders, page) + responseMsg += "%s\n\n%s\n" % (logHeaders, page) logger.log(7, responseMsg) diff --git a/lib/request/redirecthandler.py b/lib/request/redirecthandler.py index f9535748e..8f0454dcd 100644 --- a/lib/request/redirecthandler.py +++ b/lib/request/redirecthandler.py @@ -12,7 +12,6 @@ import urllib2 from lib.core.data import conf from lib.core.data import logger from lib.core.common import getUnicode -from lib.core.common import logHTTPTraffic from lib.core.exception import sqlmapConnectionException from lib.core.threads import getCurrentThreadData @@ -29,7 +28,7 @@ class SmartRedirectHandler(urllib2.HTTPRedirectHandler): threadData = getCurrentThreadData() threadData.lastRedirectMsg = (threadData.lastRequestUID, content) - responseMsg = "HTTP response " + responseMsg = "HTTP response " responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, getUnicode(msg)) if headers: @@ -40,7 +39,7 @@ class SmartRedirectHandler(urllib2.HTTPRedirectHandler): if conf.verbose <= 5: responseMsg += getUnicode(logHeaders) elif conf.verbose > 5: - responseMsg += "%s\n%s\n" % (logHeaders, content) + responseMsg += "%s\n\n%s\n" % (logHeaders, content) logger.log(7, responseMsg)