mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
update regarding common columns existance check
This commit is contained in:
parent
3b996c3ed8
commit
be992b4471
|
@ -42,6 +42,7 @@ from lib.core.unescaper import unescaper
|
||||||
from lib.parse.banner import bannerParser
|
from lib.parse.banner import bannerParser
|
||||||
from lib.request import inject
|
from lib.request import inject
|
||||||
from lib.request.connect import Connect as Request
|
from lib.request.connect import Connect as Request
|
||||||
|
from lib.techniques.brute.use import columnExists
|
||||||
from lib.techniques.brute.use import tableExists
|
from lib.techniques.brute.use import tableExists
|
||||||
from lib.techniques.error.test import errorTest
|
from lib.techniques.error.test import errorTest
|
||||||
from lib.techniques.inband.union.test import unionTest
|
from lib.techniques.inband.union.test import unionTest
|
||||||
|
@ -847,10 +848,30 @@ class Enumeration:
|
||||||
return kb.data.cachedTables
|
return kb.data.cachedTables
|
||||||
|
|
||||||
def getColumns(self, onlyColNames=False):
|
def getColumns(self, onlyColNames=False):
|
||||||
|
bruteForce = False
|
||||||
|
|
||||||
if kb.dbms == DBMS.MYSQL and not kb.data.has_information_schema:
|
if kb.dbms == DBMS.MYSQL and not kb.data.has_information_schema:
|
||||||
errMsg = "information_schema not available, "
|
errMsg = "information_schema not available, "
|
||||||
errMsg += "back-end DBMS is MySQL < 5.0"
|
errMsg += "back-end DBMS is MySQL < 5.0"
|
||||||
raise sqlmapUnsupportedFeatureException, errMsg
|
logger.error(errMsg)
|
||||||
|
bruteForce = True
|
||||||
|
|
||||||
|
elif kb.dbms == DBMS.ACCESS:
|
||||||
|
errMsg = "cannot retrieve column names, "
|
||||||
|
errMsg += "back-end DBMS is Access"
|
||||||
|
logger.error(errMsg)
|
||||||
|
bruteForce = True
|
||||||
|
|
||||||
|
if bruteForce:
|
||||||
|
message = "do you want to use common columns existance check? [Y/n/q]"
|
||||||
|
test = readInput(message, default="Y")
|
||||||
|
|
||||||
|
if test[0] in ("n", "N"):
|
||||||
|
return
|
||||||
|
elif test[0] in ("q", "Q"):
|
||||||
|
raise sqlmapUserQuitException
|
||||||
|
else:
|
||||||
|
return columnExists(paths.COMMON_COLUMNS)
|
||||||
|
|
||||||
if not conf.tbl:
|
if not conf.tbl:
|
||||||
errMsg = "missing table parameter"
|
errMsg = "missing table parameter"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user