changing conf.dnsDomain to conf.dName just because of long text problems in help listing

This commit is contained in:
Miroslav Stampar 2012-05-28 14:15:04 +00:00
parent d2bbfa4aad
commit b1d82422a0
7 changed files with 9 additions and 9 deletions

View File

@ -1721,7 +1721,7 @@ def __setTrafficOutputFP():
conf.trafficFP = openFile(conf.trafficFile, "w+") conf.trafficFP = openFile(conf.trafficFile, "w+")
def __setDNSServer(): def __setDNSServer():
if not conf.dnsDomain: if not conf.dName:
return return
infoMsg = "setting up DNS server instance" infoMsg = "setting up DNS server instance"

View File

@ -87,7 +87,7 @@ optDict = {
"timeSec": "integer", "timeSec": "integer",
"uCols": "string", "uCols": "string",
"uChar": "string", "uChar": "string",
"dnsDomain": "string" "dName": "string"
}, },
"Fingerprint": { "Fingerprint": {

View File

@ -272,7 +272,7 @@ def cmdLineParser():
techniques.add_option("--union-char", dest="uChar", techniques.add_option("--union-char", dest="uChar",
help="Character to use for bruteforcing number of columns") help="Character to use for bruteforcing number of columns")
techniques.add_option("--dns-domain", dest="dnsDomain", techniques.add_option("--dns-domain", dest="dName",
help="Domain name used for DNS exfiltration attack") help="Domain name used for DNS exfiltration attack")
# Fingerprint options # Fingerprint options

View File

@ -84,7 +84,7 @@ def __goInference(payload, expression, charsetType=None, firstChar=None, lastCha
def __goDns(payload, expression): def __goDns(payload, expression):
value = None value = None
if conf.dnsDomain and kb.dnsTest is not False: if conf.dName and kb.dnsTest is not False:
if kb.dnsTest is None: if kb.dnsTest is None:
dnsTest(payload) dnsTest(payload)

View File

@ -26,7 +26,7 @@ def dnsTest(payload):
errMsg = "data retrieval through DNS channel failed. Turning off DNS exfiltration support" errMsg = "data retrieval through DNS channel failed. Turning off DNS exfiltration support"
logger.error(errMsg) logger.error(errMsg)
conf.dnsDomain = None conf.dName = None
else: else:
infoMsg = "data retrieval through DNS channel was successful" infoMsg = "data retrieval through DNS channel was successful"
logger.info(infoMsg) logger.info(infoMsg)

View File

@ -48,7 +48,7 @@ def dnsUse(payload, expression):
count = 0 count = 0
offset = 1 offset = 1
if conf.dnsDomain and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.MYSQL, DBMS.PGSQL): if conf.dName and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.MYSQL, DBMS.PGSQL):
output = hashDBRetrieve(expression, checkConf=True) output = hashDBRetrieve(expression, checkConf=True)
if output and PARTIAL_VALUE_MARKER in output or kb.dnsTest is None: if output and PARTIAL_VALUE_MARKER in output or kb.dnsTest is None:
@ -67,7 +67,7 @@ def dnsUse(payload, expression):
nulledCastedField = agent.hexConvertField(nulledCastedField) nulledCastedField = agent.hexConvertField(nulledCastedField)
expressionReplaced = expression.replace(fieldToCastStr, nulledCastedField, 1) expressionReplaced = expression.replace(fieldToCastStr, nulledCastedField, 1)
expressionRequest = getSPQLSnippet(Backend.getIdentifiedDbms(), "dns_request", PREFIX=prefix, QUERY=expressionReplaced, SUFFIX=suffix, DOMAIN=conf.dnsDomain) expressionRequest = getSPQLSnippet(Backend.getIdentifiedDbms(), "dns_request", PREFIX=prefix, QUERY=expressionReplaced, SUFFIX=suffix, DOMAIN=conf.dName)
expressionUnescaped = unescaper.unescape(expressionRequest) expressionUnescaped = unescaper.unescape(expressionRequest)
if Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.PGSQL): if Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.PGSQL):
@ -108,7 +108,7 @@ def dnsUse(payload, expression):
debugMsg = "performed %d queries in %d seconds" % (count, calculateDeltaSeconds(start)) debugMsg = "performed %d queries in %d seconds" % (count, calculateDeltaSeconds(start))
logger.debug(debugMsg) logger.debug(debugMsg)
elif conf.dnsDomain: elif conf.dName:
warnMsg = "DNS data exfiltration method through SQL injection " warnMsg = "DNS data exfiltration method through SQL injection "
warnMsg += "is currently not available for DBMS %s" % Backend.getIdentifiedDbms() warnMsg += "is currently not available for DBMS %s" % Backend.getIdentifiedDbms()
singleTimeWarnMessage(warnMsg) singleTimeWarnMessage(warnMsg)

View File

@ -299,7 +299,7 @@ uChar =
# Domain name used for DNS exfiltration attack # Domain name used for DNS exfiltration attack
# Valid: string # Valid: string
dnsDomain = dName =
[Fingerprint] [Fingerprint]