count-nssets: get the number of name server set occurrences in the dataset
Description
Count the number of occurrences of the same set of domain names of name servers for all the domains.
This is the fourth tool in the respdiff query filter toolchain. It's purpose is to detect how many times the same name server set appears among all the domains in the data set.
Example
respdiff-rs [--lmdb <ENVDIR>] count-nsset [--overwrite]
Input
nsset
LMDB - Read all name server sets
- Format:
domain = <NS1_domain><NS2_domain>...<NS3_domain>
Output
nsset_counts
LMDB - Write number of occurrences uint
X
for each name server set - Format:
<NS1_domain><NS2_domain>...<NS3_domain> = X
Operation
- ensure LMDB
nsset_counts
doesn't exist yet / zero out counters - for each (domain, nsset) in LMDB
nssets
- get key nsset from LMDB
nsset_counts
- if not found, set count = 1
- else set count = count + 1
- write
nsset = count
to LMDBnsset_counts
- get key nsset from LMDB