Skip to content

Commit 2188502

Browse files
committed
Fixes #1731
1 parent 98972d0 commit 2188502

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugins/dbms/mssqlserver/connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def connect(self):
4141

4242
try:
4343
self.connector = pymssql.connect(host="%s:%d" % (self.hostname, self.port), user=self.user, password=self.password, database=self.db, login_timeout=conf.timeout, timeout=conf.timeout)
44-
except (pymssql.InterfaceError, pymssql.OperationalError), msg:
44+
except (pymssql.ProgrammingError, pymssql.OperationalError, _mssql.MssqlDatabaseException), msg:
4545
raise SqlmapConnectionException(msg)
4646

4747
self.initCursor()

plugins/dbms/sybase/connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def connect(self):
4141

4242
try:
4343
self.connector = pymssql.connect(host="%s:%d" % (self.hostname, self.port), user=self.user, password=self.password, database=self.db, login_timeout=conf.timeout, timeout=conf.timeout)
44-
except pymssql.OperationalError, msg:
44+
except (pymssql.ProgrammingError, pymssql.OperationalError, _mssql.MssqlDatabaseException), msg:
4545
raise SqlmapConnectionException(msg)
4646

4747
self.initCursor()

0 commit comments

Comments
 (0)