mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Minor refactoring
This commit is contained in:
parent
e0149e1c5f
commit
0398cbdc76
10 changed files with 22 additions and 22 deletions
|
|
@ -24,7 +24,7 @@ def dnsTest(payload):
|
|||
if not kb.dnsTest:
|
||||
errMsg = "data retrieval through DNS channel failed"
|
||||
if not conf.forceDns:
|
||||
conf.dnsName = None
|
||||
conf.dnsDomain = None
|
||||
errMsg += ". Turning off DNS exfiltration support"
|
||||
logger.error(errMsg)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ def dnsUse(payload, expression):
|
|||
count = 0
|
||||
offset = 1
|
||||
|
||||
if conf.dnsName and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.MYSQL, DBMS.PGSQL):
|
||||
if conf.dnsDomain 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:
|
||||
|
|
@ -69,7 +69,7 @@ def dnsUse(payload, expression):
|
|||
nulledCastedField = agent.hexConvertField(nulledCastedField)
|
||||
expressionReplaced = expression.replace(fieldToCastStr, nulledCastedField, 1)
|
||||
|
||||
expressionRequest = getSQLSnippet(Backend.getIdentifiedDbms(), "dns_request", PREFIX=prefix, QUERY=expressionReplaced, SUFFIX=suffix, DOMAIN=conf.dnsName)
|
||||
expressionRequest = getSQLSnippet(Backend.getIdentifiedDbms(), "dns_request", PREFIX=prefix, QUERY=expressionReplaced, SUFFIX=suffix, DOMAIN=conf.dnsDomain)
|
||||
expressionUnescaped = unescaper.escape(expressionRequest)
|
||||
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.PGSQL):
|
||||
|
|
@ -111,7 +111,7 @@ def dnsUse(payload, expression):
|
|||
debugMsg = "performed %d queries in %.2f seconds" % (count, calculateDeltaSeconds(start))
|
||||
logger.debug(debugMsg)
|
||||
|
||||
elif conf.dnsName:
|
||||
elif conf.dnsDomain:
|
||||
warnMsg = "DNS data exfiltration method through SQL injection "
|
||||
warnMsg += "is currently not available for DBMS %s" % Backend.getIdentifiedDbms()
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue