Verified Commit c1b43ad0 authored by Jelle Besseling's avatar Jelle Besseling
Browse files

Add final version

parent 58e1dd24
[
{
"name": "f.root-servers.net.",
"type": "A",
"class": "IN",
"ttl": 188915,
"rdata": {
"address": "192.5.5.241"
},
"timestamp": 1524558375.6622338
},
{
"name": "nsa.nic.uk.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "156.154.100.3"
},
"timestamp": 1524558940.5319269
},
{
"name": "nsb.nic.uk.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "156.154.101.3"
},
"timestamp": 1524558940.5319269
},
{
"name": "nsc.nic.uk.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "156.154.102.3"
},
"timestamp": 1524558940.5319269
},
{
"name": "nsd.nic.uk.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "156.154.103.3"
},
"timestamp": 1524558940.5319269
},
{
"name": "dns1.nic.uk.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "213.248.216.1"
},
"timestamp": 1524558940.5319269
},
{
"name": "dns2.nic.uk.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "103.49.80.1"
},
"timestamp": 1524558940.5319269
},
{
"name": "dns3.nic.uk.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "213.248.220.1"
},
"timestamp": 1524558940.5319269
},
{
"name": "dns4.nic.uk.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "43.230.48.1"
},
"timestamp": 1524558940.5319269
},
{
"name": "ns0.ja.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "128.86.1.20"
},
"timestamp": 1524558940.7854562
},
{
"name": "ns0.ja.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "193.63.94.20"
},
"timestamp": 1524558940.7854562
},
{
"name": "ns1.ja.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "194.81.227.226"
},
"timestamp": 1524558940.7854562
},
{
"name": "ns2.ja.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "193.63.105.17"
},
"timestamp": 1524558940.7854562
},
{
"name": "ns4.ja.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "193.62.157.66"
},
"timestamp": 1524558940.7854562
},
{
"name": "dns0.wnl.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "212.219.242.129"
},
"timestamp": 1524558941.0727656
},
{
"name": "dns1.wnl.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "137.44.1.156"
},
"timestamp": 1524558941.0727656
},
{
"name": "dns2.wnl.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "193.63.78.25"
},
"timestamp": 1524558941.0727656
},
{
"name": "k.root-servers.net.",
"type": "A",
"class": "IN",
"ttl": 181206,
"rdata": {
"address": "193.0.14.129"
},
"timestamp": 1524572714.6709983
},
{
"name": "c.root-servers.net.",
"type": "A",
"class": "IN",
"ttl": 236703,
"rdata": {
"address": "192.33.4.12"
},
"timestamp": 1524572714.7228022
},
{
"name": "d.root-servers.net.",
"type": "A",
"class": "IN",
"ttl": 252882,
"rdata": {
"address": "199.7.91.13"
},
"timestamp": 1524572714.7228022
},
{
"name": "l.root-servers.net.",
"type": "A",
"class": "IN",
"ttl": 253000,
"rdata": {
"address": "199.7.83.42"
},
"timestamp": 1524572714.7853332
},
{
"name": "demand.beta.aridns.net.au.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "37.209.194.7"
},
"timestamp": 1524572714.832156
},
{
"name": "demand.alpha.aridns.net.au.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "37.209.192.7"
},
"timestamp": 1524572714.832156
},
{
"name": "demand.delta.aridns.net.au.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "37.209.198.7"
},
"timestamp": 1524572714.832156
},
{
"name": "demand.gamma.aridns.net.au.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "37.209.196.7"
},
"timestamp": 1524572714.832156
},
{
"name": "g.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.42.93.30"
},
"timestamp": 1524572715.0685196
},
{
"name": "h.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.54.112.30"
},
"timestamp": 1524572715.0685196
},
{
"name": "i.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.43.172.30"
},
"timestamp": 1524572715.0685196
},
{
"name": "j.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.48.79.30"
},
"timestamp": 1524572715.0685196
},
{
"name": "k.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.52.178.30"
},
"timestamp": 1524572715.0685196
},
{
"name": "l.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.41.162.30"
},
"timestamp": 1524572715.0685196
},
{
"name": "m.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.55.83.30"
},
"timestamp": 1524572715.0685196
},
{
"name": "kim.ns.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "173.245.58.126"
},
"timestamp": 1524572715.1466477
},
{
"name": "walt.ns.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "173.245.59.148"
},
"timestamp": 1524572715.1466477
},
{
"name": "ns1.dns.nl.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "193.176.144.5"
},
"timestamp": 1524572715.45005
},
{
"name": "ns2.dns.nl.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "194.146.106.42"
},
"timestamp": 1524572715.45005
},
{
"name": "ns3.dns.nl.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "194.171.17.10"
},
"timestamp": 1524572715.45005
},
{
"name": "ns4.dns.nl.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "95.142.99.212"
},
"timestamp": 1524572715.45005
},
{
"name": "ns5.dns.nl.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "194.0.28.53"
},
"timestamp": 1524572715.45005
},
{
"name": "ns-nl.nic.fr.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.93.0.4"
},
"timestamp": 1524572715.45005
},
{
"name": "sns-pb.isc.org.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.5.4.1"
},
"timestamp": 1524572715.45005
},
{
"name": "a.root-servers.net.",
"type": "A",
......@@ -429,226 +19,6 @@
},
"timestamp": 1524653501.5647268
},
{
"name": "a.ns.nu.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "194.146.106.22"
},
"timestamp": 1524653506.6073616
},
{
"name": "b.ns.nu.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "65.22.164.1"
},
"timestamp": 1524653506.6073616
},
{
"name": "c.ns.nu.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.36.144.107"
},
"timestamp": 1524653506.6073616
},
{
"name": "d.ns.nu.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "213.108.25.4"
},
"timestamp": 1524653506.6073616
},
{
"name": "y.ns.nu.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "185.159.197.150"
},
"timestamp": 1524653506.6073616
},
{
"name": "z.ns.nu.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "185.159.198.150"
},
"timestamp": 1524653506.6073616
},
{
"name": "a.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.5.6.30"
},
"timestamp": 1524653512.058845
},
{
"name": "b.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.33.14.30"
},
"timestamp": 1524653512.058845
},
{
"name": "c.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.26.92.30"
},
"timestamp": 1524653512.058845
},
{
"name": "d.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.31.80.30"
},
"timestamp": 1524653512.058845
},
{
"name": "e.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.12.94.30"
},
"timestamp": 1524653512.058845
},
{
"name": "f.gtld-servers.net.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "192.35.51.30"
},
"timestamp": 1524653512.074407
},
{
"name": "ns3.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "162.159.0.33"
},
"timestamp": 1524653512.1212833
},
{
"name": "ns3.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "162.159.7.226"
},
"timestamp": 1524653512.1212833
},
{
"name": "ns5.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "162.159.2.9"
},
"timestamp": 1524653512.1212833
},
{
"name": "ns5.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "162.159.9.55"
},
"timestamp": 1524653512.1212833
},
{
"name": "ns4.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "162.159.1.33"
},
"timestamp": 1524653512.1212833
},
{
"name": "ns4.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "162.159.8.55"
},
"timestamp": 1524653512.1212833
},
{
"name": "ns6.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "162.159.3.11"
},
"timestamp": 1524653512.1369076
},
{
"name": "ns6.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "162.159.5.6"
},
"timestamp": 1524653512.1369076
},
{
"name": "ns7.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 172800,
"rdata": {
"address": "162.159.4.8"
},
"timestamp": 1524653512.1369076
},
{
"name": "jerry.ns.cloudflare.com.",
"type": "A",
"class": "IN",
"ttl": 86400,
"rdata": {
"address": "173.245.59.182"
},
"timestamp": 1524653512.1838403
},
{
"name": "a.edu-servers.net.",
"type": "A",
......@@ -738,15 +108,5 @@
"address": "128.119.10.28"
},
"timestamp": 1524727857.3357153
},
{
"name": "gaia.cs.umass.edu.",
"type": "A",
"class": "IN",
"ttl": 21600,
"rdata": {
"address": "128.119.245.12"
},
"timestamp": 1524727857.476341
}
]
\ No newline at end of file
......@@ -7,9 +7,9 @@ things in this module. This resolver will be both used by the DNS client and the
DNS server, but with a different list of servers.
"""
import socket
import heapq
import logging
import socket
from dns.classes import Class
from dns.message import Message, Question, Header
......@@ -36,16 +36,16 @@ class Resolver:
self.cache = cache
def gethostbyname(self, hostname, nameservers=None):
'''
""" The required library function for the assignment, only with added optional nameservers parameter
:param hostname: The hostname to be resolved
:param nameservers: The root servers to use