Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.4 KB

qprep.rst

File metadata and controls

45 lines (30 loc) · 1.4 KB

Qprep

Usage

$ ./qprep.py "${DIR}" < list_of_queries_in_text_format    # basic example
$ ./qprep.py --help                                       # for more info

Description

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.

Notes

  • 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 executing orchestrator.py on it).

Testing data

Feel free to use the following text query datasets: