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