#!/bin/bash

#
# header
#

echo -ne "\xAB\xCD" # id
echo -ne "\x01\x00" # Query parameters
echo -ne "\x00\x01" # Number of questions
echo -ne "\x00\x00" # Number of answers
echo -ne "\x00\x00" # Number of authority records
echo -ne "\x00\x00" # Number of additional records

# 
# question
#

echo -ne "\x07"                           # длина "example" - 7 байт
echo -ne "example"                        # example
echo -ne "\x03"                           # длина "com" - 3 байта
echo -ne "com"                            # com
echo -ne "\x00"                           # QNAME закончилось

echo -ne "\x00\x01" # QTYPE
echo -ne "\x00\x01" # QCLASS
