/usr/bin/dnstracesort is in djbdns 1:1.05-8ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #!/bin/sh
# WARNING: This file was auto-generated. Do not edit!
awk -F: '
BEGIN { OFS=":" }
{
if ($5 == "tx") next
if ($5 == "A") {
print "glue",$6,$3,$4,"answer",$6" A "$7
next
}
if ($5 == "NS") {
print "glue",$6,$3,$4,"answer",$6" NS "$7
next
}
print
}
' | sort -t: -k 1,3 -k 5 -k 4,5 -k 3,4 | uniq | awk -F: '
{
type = $1
q = $2
c = $3
ip = sprintf("%-16s",$4)
if (q != lastq) { print ""; lastq = q }
if ($5 == "ALERT") {
result = "A\bAL\bLE\bER\bRT\bT:\b: " $6
}
else if ($5 == "answer") {
if (index($6,q" ") == 1)
$6 = substr($6,length(q) + 2)
result = $6
}
else if ($5 == "see") {
result = "see " $6
}
else if ($5 == "CNAME") {
result = "CNAME "$6
}
else
result = $5
if (c != ".") {
q = substr(q,1,length(q) - length(c))
for (i = 1;i <= length(c);++i) {
ci = substr(c,i,1)
q = q "_\b" ci
}
}
print type,q,ip,result
}
'
|