how is resolved a given domain from differents nameservers
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
logs
.codeclimate.yml
.coveragerc
.dockerignore
.gitignore
.pylintrc
.pyup.yml
.travis.yml
LICENSE
Pipfile
Pipfile.lock
README.md
dnslist.txt
howisresolved.py
logging.json
requirements-pyup.txt
test_howisresolved.py

README.md

Build Status

Maintainability Test Coverage

Updates Python 3

howisresolved

how is resolved is a little python script to resolve a domain from differents nameservers.

how it works

DNS list is passed with a simple txt file.

By default it is dnslist.txt and contain six major dns.

  • 1.1.1.1 - CloudFlare
  • 4.2.2.1 - Level3
  • 8.8.8.8 - Google
  • 9.9.9.9 - Quad9
  • 64.6.64.6 - Verisign
  • 208.67.222.222 - OpenDNS

If the dnsfile.txt is not present the script download a list of valid nameservers from public-dns.info.

An output on logfile is generated. On cli too if debug is active. [check logging.json]

Python3 required.

To the Users

Install dependencies using Pipenv.

$ pipenv --three install

For a bit of info

$ pipenv run python howisresolved.py --help

Example

$ pipenv run python howisresolved.py --domain python.org --expect 23.253.135.79
$ pipenv run python howisresolved.py --domain python.org --dnsfile dnslist.txt --dnsrand 6 --expect 23.253.135.79
$ pipenv run python howisresolved.py --domain python.org --dnsrand 6 --expect 23.253.135.79

random nameserver: ['4.2.2.1', '8.8.8.8', '9.9.9.9', '1.1.1.1', '208.67.222.222', '64.6.64.6']

python.org IP 23.253.135.79 resolved by 4.2.2.1
python.org IP 23.253.135.79 resolved by 8.8.8.8
python.org IP 23.253.135.79 resolved by 9.9.9.9
python.org IP 23.253.135.79 resolved by 1.1.1.1
python.org IP 23.253.135.79 resolved by 208.67.222.222
python.org IP 23.253.135.79 resolved by 64.6.64.6

To Contributors

Install dev dipendencies to avoid useless issues.

$ pipenv --three install -d

To launch tests with coverage

$ pipenv run pytest -v --cov=./

or use pipenv shortcut

$ pipenv run tests

issue&&PR || GTFO

enjoy.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details