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

Function _setDNSServer

lib/core/option.py:2445–2467  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2443 conf.httpCollector = HTTPCollectorFactory(conf.harFile).create()
2444
2445def _setDNSServer():
2446 if not conf.dnsDomain:
2447 return
2448
2449 infoMsg = "setting up DNS server instance"
2450 logger.info(infoMsg)
2451
2452 isAdmin = runningAsAdmin()
2453
2454 if isAdmin:
2455 try:
2456 conf.dnsServer = DNSServer()
2457 conf.dnsServer.run()
2458 except socket.error as ex:
2459 errMsg = "there was an error while setting up "
2460 errMsg += "DNS server instance ('%s')" % getSafeExString(ex)
2461 raise SqlmapGenericException(errMsg)
2462 else:
2463 errMsg = "you need to run sqlmap as an administrator "
2464 errMsg += "if you want to perform a DNS data exfiltration attack "
2465 errMsg += "as it will need to listen on privileged UDP port 53 "
2466 errMsg += "for incoming address resolution attempts"
2467 raise SqlmapMissingPrivileges(errMsg)
2468
2469def _setProxyList():
2470 if not conf.proxyFile:

Callers 1

initFunction · 0.85

Calls 7

runningAsAdminFunction · 0.90
DNSServerClass · 0.90
getSafeExStringFunction · 0.90
infoMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…