socktools.examples.simple_dns¶
This module implements a simple toy DNS server using dnslib to encode/decode packets. To test it, run this module as a script and then query it on port 31337.
-
class
socktools.examples.simple_dns.DNSProtocol(msg_types={}, **kwargs)[source]¶ Bases:
socktools.msgtype_mixin.MsgtypeSendMixin,socktools.msgtype_mixin.MsgtypeStrMixin,socktools.udp_sock.UDPSockDNS protocol implementation
This class implements the world’s worst DNS server: all hostnames return NXDOMAIN