<commit_before># soaping

_soaping_ means _"SOA ping"_.

Soaping sends DNS SOA queries to the name servers for a domain, and
saves the serial number, response time, and name server ID (NSID)
returned by each. This is useful for tracking DNS zone propagation
time to the authoritative servers for a domain.

## Installation

Soaping requires Python 3. The only additional requirement is the
[dnspython](http://www.dnspython.org/) package.

To get the code you can clone the GitHub repository:

    $ git clone https://github.com/shane-kerr/soaping.git

I like to use a virtual environment for that. In Debian you can do
this as follows:

    $ sudo apt install python3-venv
    $ python3 -m venv venv
    $ . venv/bin/activate
    $ python3 -m pip install dnspython

For PyPy3 this is slightly different:

    $ pypy -m venv venv
    $ . venv/bin/activate
    $ python3 -m ensurepip
    $ python3 -m pip install dnspython
    $ python3 -m pip install selectors34

## Running

To run the program, specify the domain to watch:

    $ python3 soaping.py example.com

Any problems in execution will be printed to the console. Output is in
the `soaping.csv` file, which is rotated every 30 minutes.<commit_msg>Document ability to select alternate server<commit_after># soaping

_soaping_ means _"SOA ping"_.

Soaping sends DNS SOA queries to the name servers for a domain, and
saves the serial number, response time, and name server ID (NSID)
returned by each. This is useful for tracking DNS zone propagation
time to the authoritative servers for a domain.

## Installation

Soaping requires Python 3. The only additional requirement is the
[dnspython](http://www.dnspython.org/) package.

To get the code you can clone the GitHub repository:

    $ git clone https://github.com/shane-kerr/soaping.git

I like to use a virtual environment for that. In Debian you can do
this as follows:

    $ sudo apt install python3-venv
    $ python3 -m venv venv
    $ . venv/bin/activate
    $ python3 -m pip install dnspython

For PyPy3 this is slightly different:

    $ pypy -m venv venv
    $ . venv/bin/activate
    $ python3 -m ensurepip
    $ python3 -m pip install dnspython
    $ python3 -m pip install selectors34

## Running

To run the program, specify the domain to watch:

    $ python3 soaping.py example.com

Any problems in execution will be printed to the console. Output is in
the `soaping.csv` file, which is rotated every 30 minutes.

Normally the system DNS resolver is used to find the name servers for
the domain, along with the IPv4 and IPv6 addresses of those name
servers. If you want to use an alternate DNS resolver, you can specify
this:

    $ python3 soaping.py -r 8.8.8.8 example.org

It also supports DNS over TLS, so you could monitor the Yeti root
servers at a privacy-protecting open resolver:

    $ python3 soaping.py -r fdf8:f53e:61e4::18 --tls .
{'fraction_non_alphanumeric': 0.06132404181184669, 'fraction_numerical': 0.014634146341463415, 'mean_word_length': 3.4305555555555554, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7161031', 'n_tokens_mistral': 894, 'n_tokens_neox': 846, 'n_words': 402}