This commit is contained in:
justine 2020-10-04 13:21:08 +02:00
parent a674d1c50a
commit 363ea2b420

62
README.md Normal file
View File

@ -0,0 +1,62 @@
nstest
------
This script is used to test the response time of dns servers.
## Prequisites
dnspython
```
python3 -m pip install dnspython
```
## 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):
```python
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):
```python
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 :
```zsh
┌─[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
```