mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
yes, I am quite paranoid with cosmetics
This commit is contained in:
@@ -1505,7 +1505,7 @@ def beep():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if sys.platform == 'linux2':
|
if sys.platform == 'linux2':
|
||||||
for dev in ('/dev/audio', '/dev/dsp'):
|
for dev in ('/dev/audio', '/dev/dsp', '/dev/sound'):
|
||||||
if os.path.exists(dev):
|
if os.path.exists(dev):
|
||||||
try:
|
try:
|
||||||
audio = file(dev, 'wb')
|
audio = file(dev, 'wb')
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ class Connector(GenericConnector):
|
|||||||
GenericConnector.__init__(self)
|
GenericConnector.__init__(self)
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
errMsg = "on SAP MaxDB it is not possible to establish an "
|
errMsg = "on SAP MaxDB it is not possible to establish a "
|
||||||
errMsg += "direct connection"
|
errMsg += "direct connection"
|
||||||
raise sqlmapUnsupportedFeatureException, errMsg
|
raise sqlmapUnsupportedFeatureException, errMsg
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ class Connector(GenericConnector):
|
|||||||
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg:
|
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg:
|
||||||
warnMsg = "unable to connect using SQLite 3 library, trying with SQLite 2"
|
warnMsg = "unable to connect using SQLite 3 library, trying with SQLite 2"
|
||||||
logger.warning(warnMsg)
|
logger.warning(warnMsg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
@@ -54,6 +55,7 @@ class Connector(GenericConnector):
|
|||||||
errMsg = "sqlmap requires 'python-sqlite2' third-party library "
|
errMsg = "sqlmap requires 'python-sqlite2' third-party library "
|
||||||
errMsg += "in order to directly connect to the database '%s'" % self.db
|
errMsg += "in order to directly connect to the database '%s'" % self.db
|
||||||
raise sqlmapMissingDependence, errMsg
|
raise sqlmapMissingDependence, errMsg
|
||||||
|
|
||||||
self.__sqlite = sqlite
|
self.__sqlite = sqlite
|
||||||
self.connector = self.__sqlite.connect(database=self.db, check_same_thread=False, timeout=conf.timeout)
|
self.connector = self.__sqlite.connect(database=self.db, check_same_thread=False, timeout=conf.timeout)
|
||||||
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg:
|
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg:
|
||||||
|
|||||||
Reference in New Issue
Block a user