mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-08 15:49:01 +00:00
Minor update
This commit is contained in:
@@ -89,17 +89,22 @@ class DNSServer(object):
|
||||
|
||||
def _check_localhost(self):
|
||||
response = b""
|
||||
s = None
|
||||
|
||||
try:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
s.settimeout(1.0)
|
||||
s.connect(("", 53))
|
||||
s.send(binascii.unhexlify("6509012000010000000000010377777706676f6f676c6503636f6d00000100010000291000000000000000")) # A www.google.com
|
||||
response = s.recv(512)
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
if response and b"google" in response:
|
||||
raise socket.error("another DNS service already running on '0.0.0.0:53'")
|
||||
if s:
|
||||
s.close()
|
||||
|
||||
if response and b"google" in response:
|
||||
raise socket.error("another DNS service already running on '0.0.0.0:53'")
|
||||
|
||||
def pop(self, prefix=None, suffix=None):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user