mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
Update related to the #2677
This commit is contained in:
@@ -12,6 +12,7 @@ except:
|
||||
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
|
||||
from lib.core.convert import utf8encode
|
||||
from lib.core.data import conf
|
||||
@@ -42,7 +43,11 @@ class Connector(GenericConnector):
|
||||
try:
|
||||
self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password, mode=cx_Oracle.SYSDBA)
|
||||
logger.info("successfully connected as SYSDBA")
|
||||
except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError):
|
||||
except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError), ex:
|
||||
if "" in str(ex):
|
||||
msg = re.sub(r'DPI-\d+:\s+|: "[^"]+"', "", str(ex))
|
||||
raise SqlmapConnectionException(msg)
|
||||
|
||||
try:
|
||||
self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password)
|
||||
except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError), msg:
|
||||
|
||||
Reference in New Issue
Block a user