mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Fix for an Issue #345
This commit is contained in:
parent
51a77d1fe2
commit
3ab4a5e36d
|
@ -1555,7 +1555,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.lastParserStatus = None
|
kb.lastParserStatus = None
|
||||||
|
|
||||||
kb.locks = AttribDict()
|
kb.locks = AttribDict()
|
||||||
for _ in ("cache", "count", "index", "io", "limit", "log", "request", "value"):
|
for _ in ("cache", "count", "index", "io", "limit", "log", "redirect", "request", "value"):
|
||||||
kb.locks[_] = threading.Lock()
|
kb.locks[_] = threading.Lock()
|
||||||
|
|
||||||
kb.matchRatio = None
|
kb.matchRatio = None
|
||||||
|
|
|
@ -38,12 +38,13 @@ class SmartRedirectHandler(urllib2.HTTPRedirectHandler):
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def _ask_redirect_choice(self, redcode, redurl):
|
def _ask_redirect_choice(self, redcode, redurl):
|
||||||
if kb.redirectChoice is None:
|
with kb.locks.redirect:
|
||||||
msg = "sqlmap got a %d redirect to " % redcode
|
if kb.redirectChoice is None:
|
||||||
msg += "'%s'. Do you want to follow? [Y/n] " % redurl
|
msg = "sqlmap got a %d redirect to " % redcode
|
||||||
choice = readInput(msg, default="Y")
|
msg += "'%s'. Do you want to follow? [Y/n] " % redurl
|
||||||
|
choice = readInput(msg, default="Y")
|
||||||
|
|
||||||
kb.redirectChoice = choice.upper()
|
kb.redirectChoice = choice.upper()
|
||||||
|
|
||||||
def http_error_302(self, req, fp, code, msg, headers):
|
def http_error_302(self, req, fp, code, msg, headers):
|
||||||
content = None
|
content = None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user