2020-10-04 12:59:00 +00:00
2020-10-04 13:18:34 +02:00
2020-10-04 12:59:00 +00:00

nstest

This script is used to test the response time of dns servers.

Prequisites

dnspython 2.0.0 or more

python3 -m pip install dnspython
#In case you need to upgrade add the --upgrade argument

Usage

At the beginning of the script are a list of sites used to test the DNS resolvers (feel free to use what you want):

sites = [\
        "wiki.squirrelsystem.fr",\
        "www.justgeek.fr",\
        "www.yahoo.co.jp",
        "mail.google.com",\
        "store.steampowered.com",\
        "pornhub.com",\
        "rznet.fr"\
        ]

There also is a list of DNS servers (use a list suited for your needs):

dnsservers = [\
        "1.1.1.1",\
        "8.8.8.8",\
        "208.67.222.222",\
        "156.154.70.1",\
        "199.85.126.10",\
        "8.26.56.26",\
        "80.67.169.12",\
        "9.9.9.9",\
        "64.6.64.6",\
        "37.235.1.174"\
        ]

Simply call the script and it will give you an output based on the average answer time of the server :

┌─[justine@Argonaut] - [~] - [128]
└─[$] ./nstest.py                                                                                          [13:14:42]
1.1.1.1 --------> 171.01590973990304 ms
8.8.8.8 --------> 6.01921762738909 ms
208.67.222.222 --------> 6.077868597848075 ms
156.154.70.1 --------> 6.187098366873605 ms
199.85.126.10 --------> 6.965024130684989 ms
8.26.56.26 --------> 6.552696228027344 ms
80.67.169.12 --------> 6.45068713596889 ms
9.9.9.9 --------> 5.886622837611607 ms
64.6.64.6 --------> 5.738667079380581 ms
37.235.1.174 --------> 6.251607622419085 ms
Description
A python script used to test the response time of DNS servers
Readme 25 KiB
Languages
Python 100%