You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./enumdb.py 10.x.x.x -u sa -p sa -t mssql -columns
`Starting enumdb v.2.0
[+] Connection established sa:sa@10.x.x.x
[] Column: className Table: autoadmin_task_agents DB: msdb SRV:
(mssql)
[] Column: is_password_protected Table: backupmediaset DB: msdb SRV:
(mssql)
[*] Column: is_password_protected Table: backupset DB: msdb SRV: 10.60.111.107 (mssql)
Exception in thread Thread-1:
Traceback (most recent call last):
File "pymssql.pyx", line 447, in pymssql.Cursor.execute
File "_mssql.pyx", line 1011, in _mssql.MSSQLConnection.execute_query
File "_mssql.pyx", line 1042, in _mssql.MSSQLConnection.execute_query
File "_mssql.pyx", line 1175, in _mssql.MSSQLConnection.format_and_run_query
File "_mssql.pyx", line 1586, in _mssql.check_cancel_and_raise
File "_mssql.pyx", line 1630, in _mssql.maybe_raise_MSSQLDatabaseException
_mssql.MSSQLDatabaseException: (942, b"Database 'IGT' cannot be opened because it is offline.DB-Lib error message 20018, severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\n")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "./enumdb.py", line 197, in db_main
self.db_enum(class_obj, args.dbtype, con, outfile, target, args.column_search, args.report, args.verbose)
File "./enumdb.py", line 206, in db_enum
for table in db_class.get_tables(con, database):
File "./enumdb.py", line 165, in get_tables
for x in self.db_query(con, 'SELECT NAME FROM {}.sys.tables;'.format(database)):
File "./enumdb.py", line 152, in db_query
cur.execute(cmd)
File "pymssql.pyx", line 467, in pymssql.Cursor.execute
pymssql.OperationalError: (942, b"Database 'IGT' cannot be opened because it is offline.DB-Lib error message 20018, severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\n")
`
The text was updated successfully, but these errors were encountered:
Thanks for providing your output, it was helpful in replicating the issue. It appears the database is set to "Offline". I added more error handling to the script to catch this exception, let me know if it does the trick.
./enumdb.py 10.x.x.x -u sa -p sa -t mssql -columns
`Starting enumdb v.2.0
[+] Connection established sa:sa@10.x.x.x
[] Column: className Table: autoadmin_task_agents DB: msdb SRV:
(mssql)
[] Column: is_password_protected Table: backupmediaset DB: msdb SRV:
(mssql)
[*] Column: is_password_protected Table: backupset DB: msdb SRV: 10.60.111.107 (mssql)
Exception in thread Thread-1:
Traceback (most recent call last):
File "pymssql.pyx", line 447, in pymssql.Cursor.execute
File "_mssql.pyx", line 1011, in _mssql.MSSQLConnection.execute_query
File "_mssql.pyx", line 1042, in _mssql.MSSQLConnection.execute_query
File "_mssql.pyx", line 1175, in _mssql.MSSQLConnection.format_and_run_query
File "_mssql.pyx", line 1586, in _mssql.check_cancel_and_raise
File "_mssql.pyx", line 1630, in _mssql.maybe_raise_MSSQLDatabaseException
_mssql.MSSQLDatabaseException: (942, b"Database 'IGT' cannot be opened because it is offline.DB-Lib error message 20018, severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\n")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "./enumdb.py", line 197, in db_main
self.db_enum(class_obj, args.dbtype, con, outfile, target, args.column_search, args.report, args.verbose)
File "./enumdb.py", line 206, in db_enum
for table in db_class.get_tables(con, database):
File "./enumdb.py", line 165, in get_tables
for x in self.db_query(con, 'SELECT NAME FROM {}.sys.tables;'.format(database)):
File "./enumdb.py", line 152, in db_query
cur.execute(cmd)
File "pymssql.pyx", line 467, in pymssql.Cursor.execute
pymssql.OperationalError: (942, b"Database 'IGT' cannot be opened because it is offline.DB-Lib error message 20018, severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\n")
`
The text was updated successfully, but these errors were encountered: