Minor layout adjustments

This commit is contained in:
Bernardo Damele 2011-03-17 12:35:40 +00:00
parent 03fac62592
commit 9526f0c4c2
2 changed files with 5 additions and 5 deletions

View File

@ -297,7 +297,7 @@ class Connect:
if conf.verbose <= 5: if conf.verbose <= 5:
responseMsg += getUnicode(logHeaders) responseMsg += getUnicode(logHeaders)
elif conf.verbose > 5: elif conf.verbose > 5:
responseMsg += "%s\n%s\n" % (logHeaders, page) responseMsg += "%s\n\n%s\n" % (logHeaders, page)
logger.log(7, responseMsg) logger.log(7, responseMsg)
@ -365,12 +365,13 @@ class Connect:
responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, status) responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, status)
if responseHeaders: if responseHeaders:
logHeaders = "\n".join(["%s: %s" % (key.capitalize() if isinstance(key, basestring) else key, getUnicode(value)) for (key, value) in responseHeaders.items()]) 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))) logHTTPTraffic(requestMsg, "%s%s\n\n%s" % (responseMsg, logHeaders, page if isinstance(page, unicode) else getUnicode(page)))
if conf.verbose <= 5: if conf.verbose <= 5:
responseMsg += getUnicode(logHeaders) responseMsg += getUnicode(logHeaders)
elif conf.verbose > 5: elif conf.verbose > 5:
responseMsg += "%s\n%s\n" % (logHeaders, page) responseMsg += "%s\n\n%s\n" % (logHeaders, page)
logger.log(7, responseMsg) logger.log(7, responseMsg)

View File

@ -12,7 +12,6 @@ import urllib2
from lib.core.data import conf from lib.core.data import conf
from lib.core.data import logger from lib.core.data import logger
from lib.core.common import getUnicode from lib.core.common import getUnicode
from lib.core.common import logHTTPTraffic
from lib.core.exception import sqlmapConnectionException from lib.core.exception import sqlmapConnectionException
from lib.core.threads import getCurrentThreadData from lib.core.threads import getCurrentThreadData
@ -29,7 +28,7 @@ class SmartRedirectHandler(urllib2.HTTPRedirectHandler):
threadData = getCurrentThreadData() threadData = getCurrentThreadData()
threadData.lastRedirectMsg = (threadData.lastRequestUID, content) threadData.lastRedirectMsg = (threadData.lastRequestUID, content)
responseMsg = "HTTP response " responseMsg = "HTTP response "
responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, getUnicode(msg)) responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, getUnicode(msg))
if headers: if headers:
@ -40,7 +39,7 @@ class SmartRedirectHandler(urllib2.HTTPRedirectHandler):
if conf.verbose <= 5: if conf.verbose <= 5:
responseMsg += getUnicode(logHeaders) responseMsg += getUnicode(logHeaders)
elif conf.verbose > 5: elif conf.verbose > 5:
responseMsg += "%s\n%s\n" % (logHeaders, content) responseMsg += "%s\n\n%s\n" % (logHeaders, content)
logger.log(7, responseMsg) logger.log(7, responseMsg)