mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
ms access connector update
This commit is contained in:
parent
a02ec29c15
commit
88d74a00c1
|
@ -68,7 +68,7 @@ class Connector(GenericConnector):
|
|||
|
||||
try:
|
||||
self.cursor.execute(query)
|
||||
except pyodbc.OperationalError, msg:
|
||||
except (pyodbc.OperationalError, pyodbc.ProgrammingError), msg:
|
||||
logger.log(8, msg[1])
|
||||
except pyodbc.Error, msg:
|
||||
raise sqlmapConnectionException, msg[1]
|
||||
|
@ -76,8 +76,12 @@ class Connector(GenericConnector):
|
|||
self.connector.commit()
|
||||
|
||||
def select(self, query):
|
||||
self.cursor.execute(query)
|
||||
return self.cursor.fetchall()
|
||||
try:
|
||||
self.cursor.execute(query)
|
||||
return self.cursor.fetchall()
|
||||
except pyodbc.ProgrammingError, msg:
|
||||
logger.log(8, msg[1])
|
||||
return None
|
||||
|
||||
def setCursor(self):
|
||||
self.cursor = self.connector.cursor()
|
||||
|
|
|
@ -82,10 +82,12 @@ class Fingerprint(GenericFingerprint):
|
|||
negate = True
|
||||
table = table[1:]
|
||||
randInt = randomInt()
|
||||
query = agent.prefixQuery(" AND EXISTS(SELECT * FROM %s WHERE %d=%d)" % (table, randInt, randInt))
|
||||
query = agent.prefixQuery(" AND EXISTS(SELECT * FROM %s WHERE %d=%d) FROM %s" % (table, randInt, randInt, table))
|
||||
query = agent.postfixQuery(query)
|
||||
payload = agent.payload(newValue=query)
|
||||
result = Request.queryPage(payload)
|
||||
if result is None:
|
||||
result = False
|
||||
if negate:
|
||||
result = not result
|
||||
exist &= result
|
||||
|
|
Loading…
Reference in New Issue
Block a user