Last active
March 13, 2022 19:26
-
-
Save lukeburns/9ad9039070983598eee0e76e5803aeec to your computer and use it in GitHub Desktop.
Silent Error: `No authority address.`
This file contains hidden or 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
| const { RecursiveResolver, dnssec, wire: { Record, types } } = require('bns') | |
| const port = 5349 | |
| const resolver = new RecursiveResolver() | |
| resolver.setStub('127.0.0.1', port, hnsDS()) | |
| resolver.on('log', console.log) | |
| resolver.on('error', console.error) | |
| resolver.lookup('com', types.A).then(console.log).catch(console.error) | |
| function hnsDS () { | |
| const ksk = Record.fromJSON({ | |
| name: '.', | |
| ttl: 10800, | |
| class: 'IN', | |
| type: 'DNSKEY', | |
| data: { | |
| flags: 257, | |
| protocol: 3, | |
| algorithm: 13, | |
| publicKey: '' | |
| + 'T9cURJ2M/Mz9q6UsZNY+Ospyvj+Uv+tgrrWkLtPQwgU/Xu5Yk0l02Sn5ua2x' | |
| + 'AQfEYIzRO6v5iA+BejMeEwNP4Q==' | |
| } | |
| }) | |
| return dnssec.createDS(ksk, dnssec.hashes.SHA256) | |
| } |
Author
Author
Also Error: Maximum referrals exceeded.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you try catch
this.nextin the for(;;) loop inthis.iterate, you'll catch `No authority address' errors.