made dns0x20 warning more prominent
This commit is contained in:
parent
4e0a37c0f5
commit
510f8b93e7
14
bin/dig.js
14
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue