made dns0x20 warning more prominent

This commit is contained in:
AJ ONeal 2017-10-02 16:50:22 -06:00
parent 4e0a37c0f5
commit 510f8b93e7
1 changed files with 8 additions and 6 deletions

View File

@ -197,12 +197,6 @@ cli.main(function (args, cli) {
console.log(packet); 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) { if (!cli.norecase && !cli.recase) {
[ 'question', 'answer', 'authority', 'additional' ].forEach(function (group) { [ 'question', 'answer', 'authority', 'additional' ].forEach(function (group) {
(packet[group]||[]).forEach(function (a) { (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:'); console.log(';; Got answer:');
dig.logQuestion(packet); dig.logQuestion(packet);