minor update

This commit is contained in:
Miroslav Stampar 2011-06-11 08:33:36 +00:00
parent 84978f16c9
commit 9331abb96f
2 changed files with 7 additions and 2 deletions

View File

@ -459,6 +459,7 @@ def checkSqlInjection(place, parameter, value):
injection.data[stype].matchRatio = kb.matchRatio
injection.conf.textOnly = conf.textOnly
injection.conf.titles = conf.titles
injection.conf.string = conf.string
injection.conf.regexp = conf.regexp

View File

@ -1260,7 +1260,7 @@ def __cleanupOptions():
if conf.optimize:
#conf.predictOutput = True
conf.keepAlive = True
conf.nullConnection = not conf.textOnly
conf.nullConnection = not any([conf.textOnly, conf.titles])
conf.threads = 3 if conf.threads < 3 else conf.threads
if conf.data:
@ -1272,7 +1272,7 @@ def __cleanupOptions():
if conf.dbms:
conf.dbms = conf.dbms.capitalize()
if conf.optimize and any([conf.data, conf.textOnly]):
if conf.optimize and any([conf.data, conf.textOnly, conf.titles]):
conf.nullConnection = False
debugMsg = "turning off --null-connection switch used indirectly by switch -o"
@ -1668,6 +1668,10 @@ def __basicOptionValidation():
errMsg = "switch --text-only is incompatible with switch --null-connection"
raise sqlmapSyntaxException, errMsg
if conf.titles and conf.nullConnection:
errMsg = "switch --titles is incompatible with switch --null-connection"
raise sqlmapSyntaxException, errMsg
if conf.data and conf.nullConnection:
errMsg = "switch --data is incompatible with switch --null-connection"
raise sqlmapSyntaxException, errMsg