mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
adding redirect response to the traffic file
This commit is contained in:
parent
6d2536f217
commit
dd0ed5f5da
|
@ -39,6 +39,7 @@ class _ThreadData(threading.local):
|
|||
self.lastHTTPError = None
|
||||
self.lastRedirectMsg = None
|
||||
self.lastQueryDuration = 0
|
||||
self.lastRequestMsg = None
|
||||
self.lastRequestUID = 0
|
||||
self.retriesCount = 0
|
||||
self.seqMatcher = difflib.SequenceMatcher(None)
|
||||
|
|
|
@ -277,6 +277,8 @@ class Connect:
|
|||
|
||||
requestMsg += "\n"
|
||||
|
||||
threadData.lastRequestMsg = requestMsg
|
||||
|
||||
logger.log(8, requestMsg)
|
||||
|
||||
conn = urllib2.urlopen(req)
|
||||
|
|
|
@ -13,6 +13,7 @@ import urlparse
|
|||
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.enums import HTTPHEADER
|
||||
from lib.core.exception import sqlmapConnectionException
|
||||
from lib.core.threads import getCurrentThreadData
|
||||
|
@ -41,10 +42,9 @@ class SmartRedirectHandler(urllib2.HTTPRedirectHandler):
|
|||
else:
|
||||
logHeaders = ""
|
||||
|
||||
if conf.verbose <= 5:
|
||||
responseMsg += getUnicode(logHeaders)
|
||||
elif conf.verbose > 5:
|
||||
responseMsg += "%s\n\n%s\n" % (logHeaders, content)
|
||||
logHTTPTraffic(threadData.lastRequestMsg, "%s%s" % (responseMsg, logHeaders))
|
||||
|
||||
responseMsg += getUnicode(logHeaders)
|
||||
|
||||
logger.log(7, responseMsg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user