[sqlmap-users] sqlmap encode/decode/unicode bug
Brought to you by:
inquisb
From: Alexander R. <al...@ri...> - 2011-12-29 01:34:27
|
Hello, I got this error recently: sqlmap version: 1.0-dev (r4638) Python version: 2.6.6 Operating system: posix Command line: ./sqlmap.py -u ******************************************************* --columns Technique: UNION Back-end DBMS: MySQL (fingerprinted) Traceback (most recent call last): File "/home/alex/sqlmap-dev/_sqlmap.py", line 83, in main start() File "/home/alex/sqlmap-dev/lib/controller/controller.py", line 588, in start action() File "/home/alex/sqlmap-dev/lib/controller/action.py", line 100, in action conf.dumper.dbTableColumns(conf.dbmsHandler.getColumns()) File "/home/alex/sqlmap-dev/plugins/generic/enumeration.py", line 1138, in getColumns value = inject.getValue(query, blind=False) File "/home/alex/sqlmap-dev/lib/request/inject.py", line 433, in getValue value = __goInband(query, expected, unique, resumeValue, unpack, dump) File "/home/alex/sqlmap-dev/lib/request/inject.py", line 381, in __goInband output = unionUse(expression, unpack=unpack, dump=dump) File "/home/alex/sqlmap-dev/lib/techniques/union/use.py", line 239, in unionUse output = __oneShotUnionUse(countedExpression, unpack) File "/home/alex/sqlmap-dev/lib/techniques/union/use.py", line 59, in __oneShotUnionUse injExpression = unescaper.unescape(agent.concatQuery(expression, unpack)) File "/home/alex/sqlmap-dev/lib/core/unescaper.py", line 28, in unescape return self[identifiedDbms](expression, quote=quote) File "/home/alex/sqlmap-dev/plugins/dbms/mysql/syntax.py", line 25, in unescape unescaped = unescaped.replace(item, "0x%s" % binascii.hexlify(item.strip("'"))) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 1: ordinal not in range(128) I would assume that the problem is that the table whose columns it was trying to fetch contains an 'ä' (ä in html). This is the last line before the error dump: [01:43:06] [INFO] fetching columns for table '`källa`' on database '' The ä is an 'ä' in unicode written to the screen using ISO8859-1. Hope you have enough info, otherwise I'd be happy to supply you with more :-) Best regards, Alexander |