Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9286dd

Browse files
committed
fix for a bug reported by [email protected] (UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
47: ordinal not in range(128))
1 parent f434c3b commit e9286dd

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

lib/request/connect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def getPage(**kwargs):
133133
refreshing = kwargs.get('refreshing', False)
134134
retrying = kwargs.get('retrying', False)
135135
redirecting = kwargs.get('redirecting', False)
136+
crawling = kwargs.get('crawling', False)
136137

137138
if not urlparse.urlsplit(url).netloc:
138139
url = urlparse.urljoin(conf.url, url)
@@ -188,7 +189,7 @@ def getPage(**kwargs):
188189

189190
return page
190191

191-
elif refreshing:
192+
elif any ([refreshing, crawling]):
192193
pass
193194

194195
elif target:

lib/utils/crawler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def crawlThread():
5555
content = None
5656
try:
5757
if current:
58-
content = Request.getPage(url=current, raise404=False)[0]
58+
content = Request.getPage(url=current, crawling=True, raise404=False)[0]
5959
except sqlmapConnectionException, e:
6060
errMsg = "connection exception detected (%s). skipping " % e
6161
errMsg += "url '%s'" % current

0 commit comments

Comments
 (0)