mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Fixes #5936
This commit is contained in:
parent
1e57a377ad
commit
c79b87cb6c
3 changed files with 5 additions and 4 deletions
|
|
@ -12,6 +12,7 @@ except:
|
|||
|
||||
import logging
|
||||
import struct
|
||||
import sys
|
||||
|
||||
from lib.core.common import getSafeExString
|
||||
from lib.core.data import conf
|
||||
|
|
@ -33,7 +34,7 @@ class Connector(GenericConnector):
|
|||
self.initConnection()
|
||||
|
||||
try:
|
||||
self.connector = pymysql.connect(host=self.hostname, user=self.user, passwd=self.password, db=self.db, port=self.port, connect_timeout=conf.timeout, use_unicode=True)
|
||||
self.connector = pymysql.connect(host=self.hostname, user=self.user, passwd=self.password.encode(sys.stdin.encoding), db=self.db, port=self.port, connect_timeout=conf.timeout, use_unicode=True)
|
||||
except (pymysql.OperationalError, pymysql.InternalError, pymysql.ProgrammingError, struct.error) as ex:
|
||||
raise SqlmapConnectionException(getSafeExString(ex))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue