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