This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## How it deals with bad CDNs | |
The query is `who.ami.here.com. A` | |
1. It's going to ask at `.` to `com. NS` and get a referral | |
2. it's going to ask `com.` nameserver about `here.com. NS` and get a referral | |
... see the pattern, it just appends labels, but bear with me | |
3. We're asking `here.com` nameserver about `ami.here.com. NS` , but he's a prick and tells us 'NXDOMAIN'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 | 0.979429111596 | |
---|---|---|
4 | 0.979429111596 | |
5 | 0.979429111596 | |
6 | 0.979429111596 | |
7 | 0.979429111596 | |
8 | 0.979429111596 | |
9 | 0.979429111596 | |
10 | 0.979429111596 | |
11 | 0.979429111596 | |
12 | 0.979429111596 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require('net'); | |
var dgram = require('dgram'); | |
function ntohs(arr) { | |
return ((arr[0] & 0xFF) << 8) | (arr[1] & 0xFF); | |
} | |
function parse_name(data, pos) | |
{ | |
for (base = pos; pos < data.length;) { |
NewerOlder