Minor enhancement to support an option (--union-tech) to specify the

technique to use to detect the number of columns used in the web
application SELECT statement: NULL bruteforcing (default) or ORDER BY
clause.
This commit is contained in:
Bernardo Damele
2008-12-21 21:39:53 +00:00
parent f92b76a8b0
commit 4ae464c80d
6 changed files with 105 additions and 33 deletions

View File

@@ -239,6 +239,25 @@ def __setGoogleDorking():
raise sqlmapGenericException, errMsg
def __setUnionTech():
if not conf.uTech:
conf.uTech = "bf"
return
if conf.uTech and conf.uTech not in ( "bf", "ob" ):
infoMsg = "resetting the UNION query detection technique to "
infoMsg += "'bf', '%s' is not a valid technique" % conf.uTech
logger.info(infoMsg)
conf.uTech = "bf"
else:
debugMsg = "setting UNION query detection technique to "
debugMsg += "'%s'" % conf.uTech
logger.debug(debugMsg)
def __setDBMS():
"""
Force the back-end DBMS option.
@@ -741,6 +760,7 @@ def init(inputOptions=advancedDict()):
__setHTTPProxy()
__setThreads()
__setDBMS()
__setUnionTech()
__setGoogleDorking()
__setMultipleTargets()
__urllib2Opener()

View File

@@ -63,6 +63,7 @@ optDict = {
"stackedTest": "boolean",
"timeTest": "boolean",
"unionTest": "boolean",
"uTech": "string",
"unionUse": "boolean",
},