From e9286ddd5b16ca7b9adbccf208bd7b1db435780c Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 24 Jun 2011 19:24:11 +0000 Subject: [PATCH] fix for a bug reported by g@brindi.si (UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 47: ordinal not in range(128)) --- lib/request/connect.py | 3 ++- lib/utils/crawler.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/request/connect.py b/lib/request/connect.py index 7c245eb55..81f8f4a03 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -133,6 +133,7 @@ class Connect: refreshing = kwargs.get('refreshing', False) retrying = kwargs.get('retrying', False) redirecting = kwargs.get('redirecting', False) + crawling = kwargs.get('crawling', False) if not urlparse.urlsplit(url).netloc: url = urlparse.urljoin(conf.url, url) @@ -188,7 +189,7 @@ class Connect: return page - elif refreshing: + elif any ([refreshing, crawling]): pass elif target: diff --git a/lib/utils/crawler.py b/lib/utils/crawler.py index 1cf8d4311..8876e3c0b 100644 --- a/lib/utils/crawler.py +++ b/lib/utils/crawler.py @@ -55,7 +55,7 @@ class Crawler: content = None try: if current: - content = Request.getPage(url=current, raise404=False)[0] + content = Request.getPage(url=current, crawling=True, raise404=False)[0] except sqlmapConnectionException, e: errMsg = "connection exception detected (%s). skipping " % e errMsg += "url '%s'" % current