diff --git a/bin/dig.js b/bin/dig.js index 97f97fc..3113955 100755 --- a/bin/dig.js +++ b/bin/dig.js @@ -197,12 +197,6 @@ cli.main(function (args, cli) { console.log(packet); } - packet.question.forEach(function (q) { - // if (-1 === q.name.indexOf(cli.casedQuery)) - if (q.name !== cli.casedQuery) { - console.log(";; Warning: DNS 0x20 security not implemented (or packet spoofed). Queried '" + cli.casedQuery + "' but got response for '" + q.name + "'."); - } - }); if (!cli.norecase && !cli.recase) { [ 'question', 'answer', 'authority', 'additional' ].forEach(function (group) { (packet[group]||[]).forEach(function (a) { @@ -231,6 +225,14 @@ cli.main(function (args, cli) { }); } + packet.question.forEach(function (q) { + // if (-1 === q.name.indexOf(cli.casedQuery)) + if (q.name !== cli.casedQuery) { + console.warn(""); + console.warn(";; Warning: DNS 0x20 security not implemented (or packet spoofed). Queried '" + cli.casedQuery + "' but got response for '" + q.name + "'."); + console.warn(""); + } + }); console.log(';; Got answer:'); dig.logQuestion(packet);