From b1d82422a08c567d8c6247f090fde2d4dadaba53 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 28 May 2012 14:15:04 +0000 Subject: [PATCH] changing conf.dnsDomain to conf.dName just because of long text problems in help listing --- lib/core/option.py | 2 +- lib/core/optiondict.py | 2 +- lib/parse/cmdline.py | 2 +- lib/request/inject.py | 2 +- lib/techniques/dns/test.py | 2 +- lib/techniques/dns/use.py | 6 +++--- sqlmap.conf | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 229842c31..982f94150 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1721,7 +1721,7 @@ def __setTrafficOutputFP(): conf.trafficFP = openFile(conf.trafficFile, "w+") def __setDNSServer(): - if not conf.dnsDomain: + if not conf.dName: return infoMsg = "setting up DNS server instance" diff --git a/lib/core/optiondict.py b/lib/core/optiondict.py index d2034ae43..2442a959d 100644 --- a/lib/core/optiondict.py +++ b/lib/core/optiondict.py @@ -87,7 +87,7 @@ optDict = { "timeSec": "integer", "uCols": "string", "uChar": "string", - "dnsDomain": "string" + "dName": "string" }, "Fingerprint": { diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 7f974d74e..7b3331ceb 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -272,7 +272,7 @@ def cmdLineParser(): techniques.add_option("--union-char", dest="uChar", 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") # Fingerprint options diff --git a/lib/request/inject.py b/lib/request/inject.py index 7b74aa2f6..e5765a102 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -84,7 +84,7 @@ def __goInference(payload, expression, charsetType=None, firstChar=None, lastCha def __goDns(payload, expression): 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: dnsTest(payload) diff --git a/lib/techniques/dns/test.py b/lib/techniques/dns/test.py index 34f15438a..0b7c64e72 100644 --- a/lib/techniques/dns/test.py +++ b/lib/techniques/dns/test.py @@ -26,7 +26,7 @@ def dnsTest(payload): errMsg = "data retrieval through DNS channel failed. Turning off DNS exfiltration support" logger.error(errMsg) - conf.dnsDomain = None + conf.dName = None else: infoMsg = "data retrieval through DNS channel was successful" logger.info(infoMsg) diff --git a/lib/techniques/dns/use.py b/lib/techniques/dns/use.py index c14588d04..b8f7c52c4 100644 --- a/lib/techniques/dns/use.py +++ b/lib/techniques/dns/use.py @@ -48,7 +48,7 @@ def dnsUse(payload, expression): count = 0 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) 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) 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) 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)) logger.debug(debugMsg) - elif conf.dnsDomain: + elif conf.dName: warnMsg = "DNS data exfiltration method through SQL injection " warnMsg += "is currently not available for DBMS %s" % Backend.getIdentifiedDbms() singleTimeWarnMessage(warnMsg) diff --git a/sqlmap.conf b/sqlmap.conf index dd12c0c27..b79284422 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -299,7 +299,7 @@ uChar = # Domain name used for DNS exfiltration attack # Valid: string -dnsDomain = +dName = [Fingerprint]