$ ./qprep.py "${DIR}" < list_of_queries_in_text_format # basic example
$ ./qprep.py --help # for more info
Tool qprep.py
reads list of queries and stores wire format in a new LMDB
environment specified on command line.
Two input formats are accepted: text and PCAP.
Text format is list of queries in form <name> <RR type>
and is read
from standard input, one query on one input line.
When generating wire format from text, the tool hardcodes EDNS buffer size
4096 B and DO flag set. Future versions might allow some query customization.
Second accepted format is PCAP file. The tool copies wire format from Ethernet frames containing IP v4/v6 packets with UDP/TCP transport layer on port 53 if QR bit in DNS header is not set. Packets on port 53 which cannot be parsed as DNS packets are copied verbatim into the database.
- There is no need to re-generate the LMDB generated by
qprep.py
unless the dataset changes. The generated LMDB environment directory can be copied and re-used (before executingorchestrator.py
on it).
Feel free to use the following text query datasets:
- Top 10k DNS domains (A queries): https://gitlab.nic.cz/knot/respdiff/snippets/238/raw
- 100k unique DNS queries: https://gitlab.nic.cz/knot/respdiff/snippets/237/raw