mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
leftover
This commit is contained in:
parent
c0946ce2c9
commit
025c531d22
|
@ -34,29 +34,12 @@ from lib.core.data import logger
|
|||
from lib.core.data import queries
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.settings import FROM_DUMMY_TABLE
|
||||
from lib.core.settings import MAX_DNS_LABEL
|
||||
from lib.core.settings import PARTIAL_VALUE_MARKER
|
||||
from lib.core.unescaper import unescaper
|
||||
from lib.request.connect import Connect as Request
|
||||
|
||||
|
||||
def dnsTest(payload):
|
||||
logger.info("testing for data retrieval through DNS channel")
|
||||
|
||||
randInt = randomInt()
|
||||
kb.dnsTest = dnsUse(payload, "SELECT %d%s" % (randInt, FROM_DUMMY_TABLE.get(Backend.getIdentifiedDbms(), ""))) == str(randInt)
|
||||
|
||||
if not kb.dnsTest:
|
||||
errMsg = "data retrieval through DNS channel failed. Turning off DNS exfiltration support"
|
||||
logger.error(errMsg)
|
||||
|
||||
conf.dnsDomain = None
|
||||
else:
|
||||
infoMsg = "data retrieval through DNS channel was successful"
|
||||
logger.info(infoMsg)
|
||||
|
||||
|
||||
def dnsUse(payload, expression):
|
||||
"""
|
||||
Retrieve the output of a SQL query taking advantage of the DNS
|
||||
|
|
Loading…
Reference in New Issue
Block a user