MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / dnsTest

Function dnsTest

lib/techniques/dns/test.py:17–33  ·  view source on GitHub ↗
(payload)

Source from the content-addressed store, hash-verified

15from lib.techniques.dns.use import dnsUse
16
17def dnsTest(payload):
18 logger.info("testing for data retrieval through DNS channel")
19
20 randInt = randomInt()
21 kb.dnsTest = dnsUse(payload, "SELECT %d%s" % (randInt, FROM_DUMMY_TABLE.get(Backend.getIdentifiedDbms(), ""))) == str(randInt)
22
23 if not kb.dnsTest:
24 errMsg = "data retrieval through DNS channel failed"
25 if not conf.forceDns:
26 conf.dnsDomain = None
27 errMsg += ". Turning off DNS exfiltration support"
28 logger.error(errMsg)
29 else:
30 raise SqlmapNotVulnerableException(errMsg)
31 else:
32 infoMsg = "data retrieval through DNS channel was successful"
33 logger.info(infoMsg)

Callers 1

_goDnsFunction · 0.90

Calls 7

randomIntFunction · 0.90
dnsUseFunction · 0.90
infoMethod · 0.80
getIdentifiedDbmsMethod · 0.80
getMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…