mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
some fixes
This commit is contained in:
parent
7e560eec1f
commit
accac776fe
|
@ -56,20 +56,27 @@ class Connector(GenericConnector):
|
|||
return None
|
||||
|
||||
def execute(self, query):
|
||||
retVal = False
|
||||
|
||||
try:
|
||||
self.cursor.execute(utf8encode(query))
|
||||
retVal = True
|
||||
except (pymssql.OperationalError, pymssql.ProgrammingError), msg:
|
||||
logger.warn(msg)
|
||||
except pymssql.InternalError, msg:
|
||||
raise sqlmapConnectionException, msg
|
||||
|
||||
return retVal
|
||||
|
||||
def select(self, query):
|
||||
self.execute(query)
|
||||
value = self.fetchall()
|
||||
retVal = None
|
||||
|
||||
try:
|
||||
self.connector.commit()
|
||||
except pymssql.OperationalError:
|
||||
pass
|
||||
if self.execute(query):
|
||||
retVal = self.fetchall()
|
||||
|
||||
return value
|
||||
try:
|
||||
self.connector.commit()
|
||||
except pymssql.OperationalError:
|
||||
pass
|
||||
|
||||
return retVal
|
||||
|
|
|
@ -51,8 +51,11 @@ class Connector(GenericConnector):
|
|||
return None
|
||||
|
||||
def execute(self, query):
|
||||
retVal = False
|
||||
|
||||
try:
|
||||
self.cursor.execute(query)
|
||||
retVal = True
|
||||
except (pymysql.OperationalError, pymysql.ProgrammingError), msg:
|
||||
logger.warn(msg[1])
|
||||
except pymysql.InternalError, msg:
|
||||
|
@ -60,6 +63,12 @@ class Connector(GenericConnector):
|
|||
|
||||
self.connector.commit()
|
||||
|
||||
return retVal
|
||||
|
||||
def select(self, query):
|
||||
self.execute(query)
|
||||
return self.fetchall()
|
||||
retVal = None
|
||||
|
||||
if self.execute(query):
|
||||
retVal = self.fetchall()
|
||||
|
||||
return retVal
|
||||
|
|
|
@ -60,8 +60,11 @@ class Connector(GenericConnector):
|
|||
return None
|
||||
|
||||
def execute(self, query):
|
||||
retVal = False
|
||||
|
||||
try:
|
||||
self.cursor.execute(utf8encode(query))
|
||||
retVal = True
|
||||
except (cx_Oracle.DatabaseError), msg:
|
||||
logger.warn(msg)
|
||||
except cx_Oracle.InternalError, msg:
|
||||
|
@ -69,6 +72,12 @@ class Connector(GenericConnector):
|
|||
|
||||
self.connector.commit()
|
||||
|
||||
return retVal
|
||||
|
||||
def select(self, query):
|
||||
self.execute(query)
|
||||
return self.fetchall()
|
||||
retVal = None
|
||||
|
||||
if self.execute(query):
|
||||
retVal = self.fetchall()
|
||||
|
||||
return retVal
|
||||
|
|
|
@ -55,8 +55,11 @@ class Connector(GenericConnector):
|
|||
return None
|
||||
|
||||
def execute(self, query):
|
||||
retVal = False
|
||||
|
||||
try:
|
||||
self.cursor.execute(query)
|
||||
retVal = True
|
||||
except (psycopg2.OperationalError, psycopg2.ProgrammingError), msg:
|
||||
logger.warn(msg)
|
||||
except psycopg2.InternalError, msg:
|
||||
|
@ -64,6 +67,12 @@ class Connector(GenericConnector):
|
|||
|
||||
self.connector.commit()
|
||||
|
||||
return retVal
|
||||
|
||||
def select(self, query):
|
||||
self.execute(query)
|
||||
return self.fetchall()
|
||||
retVal = None
|
||||
|
||||
if self.execute(query):
|
||||
retVal = self.fetchall()
|
||||
|
||||
return retVal
|
||||
|
|
Loading…
Reference in New Issue
Block a user