mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-07-11 19:13:12 +00:00
Added unicode support also to PostgreSQL connector - see #184.
This commit is contained in:
parent
89c721a451
commit
e98b049e7f
2 changed files with 10 additions and 1 deletions
|
|
@ -24,6 +24,9 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
try:
|
||||
import psycopg2
|
||||
import psycopg2.extensions
|
||||
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
|
||||
psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY)
|
||||
except ImportError, _:
|
||||
pass
|
||||
|
||||
|
|
@ -54,6 +57,8 @@ class Connector(GenericConnector):
|
|||
except psycopg2.OperationalError, msg:
|
||||
raise sqlmapConnectionException, msg
|
||||
|
||||
self.connector.set_client_encoding('UNICODE')
|
||||
|
||||
self.setCursor()
|
||||
self.connected()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue