Re: [sqlmap-users] UnicodeEncodeError: 'ascii'
Brought to you by:
inquisb
From: Miroslav S. <mir...@gm...> - 2010-12-28 14:45:18
|
hi. After pair of try/failures with different encode/decode schemes, the conclusion is that urllib2 and ssl in python really have problem with sending of non-ASCII conformant values. The only solution which I can offer at this time is based on a http://en.wikipedia.org/wiki/Unicode_and_HTML. So, basically, now all non-ASCII conformant chars used in headers and/or post data are automatically converted to the format described in that article. Please retry and tell me the results. Also, this was based on an assumption that you've used "tricky" character(s) related to header and/or post. If you've used in somewhere else please tell. kr On Tue, Dec 28, 2010 at 2:36 PM, Miroslav Stampar < mir...@gm...> wrote: > Hi. > > First I thought that this was some kind of python problem, but this moment > I realized that you've probably used non-ASCII compatible cookie and/or > data. Well, I am not sure that python supports net sending of unicode > characters at the lowest level. Will research. > > KR > > > On Tue, Dec 28, 2010 at 6:39 AM, black zero <tim...@gm...>wrote: > >> sqlmap version: 0.9-dev (r2817) >> Python version: 2.6.5 >> Operating system: posix >> Traceback (most recent call last): >> File "sqlmap.py", line 79, in main >> start() >> File "/home/z00/sqlmap-dev/lib/controller/controller.py", line 248, in >> start >> if not checkConnection(suppressOutput=conf.forms) or not >> checkString() or not checkRegexp(): >> File "/home/z00/sqlmap-dev/lib/controller/checks.py", line 764, in >> checkConnection >> page, _ = Request.queryPage(content=True) >> File "/home/z00/sqlmap-dev/lib/request/connect.py", line 438, in >> queryPage >> page, headers = Connect.getPage(url=uri, get=get, post=post, >> cookie=cookie, ua=ua, silent=silent, method=method, >> auxHeaders=auxHeaders, response=response, raise404=raise404, >> ignoreTimeout=timeBasedCompare) >> File "/home/z00/sqlmap-dev/lib/request/connect.py", line 189, in getPage >> conn = urllib2.urlopen(req) >> File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen >> return _opener.open(url, data, timeout) >> File "/usr/lib/python2.6/urllib2.py", line 391, in open >> response = self._open(req, data) >> File "/usr/lib/python2.6/urllib2.py", line 409, in _open >> '_open', req) >> File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain >> result = func(*args) >> File "/usr/lib/python2.6/urllib2.py", line 1169, in https_open >> return self.do_open(httplib.HTTPSConnection, req) >> File "/usr/lib/python2.6/urllib2.py", line 1133, in do_open >> h.request(req.get_method(), req.get_selector(), req.data, headers) >> File "/usr/lib/python2.6/httplib.py", line 910, in request >> self._send_request(method, url, body, headers) >> File "/usr/lib/python2.6/httplib.py", line 947, in _send_request >> self.endheaders() >> File "/usr/lib/python2.6/httplib.py", line 904, in endheaders >> self._send_output() >> File "/usr/lib/python2.6/httplib.py", line 776, in _send_output >> self.send(msg) >> File "/usr/lib/python2.6/httplib.py", line 755, in send >> self.sock.sendall(str) >> File "/usr/lib/python2.6/ssl.py", line 203, in sendall >> v = self.send(data[count:]) >> File "/usr/lib/python2.6/ssl.py", line 94, in <lambda> >> self.send = lambda data, flags=0: SSLSocket.send(self, data, flags) >> File "/usr/lib/python2.6/ssl.py", line 174, in send >> v = self._sslobj.write(data) >> UnicodeEncodeError: 'ascii' codec can't encode character u'\u0131' in >> position 307: ordinal not in range(128) >> >> >> ------------------------------------------------------------------------------ >> Learn how Oracle Real Application Clusters (RAC) One Node allows customers >> to consolidate database storage, standardize their database environment, >> and, >> should the need arise, upgrade to a full multi-node Oracle RAC database >> without downtime or disruption >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> sqlmap-users mailing list >> sql...@li... >> https://lists.sourceforge.net/lists/listinfo/sqlmap-users >> > > > > -- > Miroslav Stampar > > E-mail / Jabber: miroslav.stampar (at) gmail.com > Mobile: +385921010204 (HR 0921010204) > PGP Key ID: 0xB5397B1B > Location: Zagreb, Croatia > -- Miroslav Stampar E-mail / Jabber: miroslav.stampar (at) gmail.com Mobile: +385921010204 (HR 0921010204) PGP Key ID: 0xB5397B1B Location: Zagreb, Croatia |