https://gibme-npm.github.io/dns/
This package is designed to encode & decode DNS packets whether they are being transmitted via:
qu
bit - Requesting unicast responsesflush
bit - Requesting clearing of cached entriesUnsupported
that provides the payload in Buffer formimport { Query } from '@gibme/dns';
const query = new Query({
id: 0,
questions: [{
type: 'A',
name: 'google.com'
}]
})
socket.send(query.buffer);
import { Packet } from '@gibme/dns';
const packet = new Packet(buffer);
console.log(packet);