New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dns-suite

Package Overview
Dependencies
Maintainers
6
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dns-suite - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

packer/type.ns.js

59

dns.types.js

@@ -5,20 +5,53 @@ (function (exports) {

var types = exports.DNS_TYPES = {
A: 0x01 // 1
, NS: 0x02 // 2
, CNAME: 0x05 // 5
, SOA: 0x06 // 6
, PTR: 0x0c // 12
, MX: 0x0f // 15
, TXT: 0x10 // 16
, AAAA: 0x1c // 28
, SRV: 0x21 // 33
, OPT: 0x29 // 41
, ANY: 0xff // 255
A: 0x1 // 1
, NS: 0x2 // 2
, CNAME: 0x5 // 5
, SOA: 0x6 // 6
, NULL: 0xa // 10
, PTR: 0xc // 12
, HINFO: 0xd // 13
, MX: 0xf // 15
, TXT: 0x10 // 16
, RP: 0x11 // 17
, AFSDB: 0x12 // 18
, SIG: 0x18 // 24
, KEY: 0x19 // 25
, AAAA: 0x1c // 28
, LOC: 0x1d // 29
, SRV: 0x21 // 33
, NAPTR: 0x23 // 35
, KX: 0x24 // 36
, CERT: 0x25 // 37
, DNAME: 0x27 // 39
, OPT: 0x29 // 41
, APL: 0x2a // 42
, DS: 0x2b // 43
, SSHFP: 0x2c // 44
, IPSECKEY: 0x2d // 45
, RRSIG: 0x2e // 46
, NSEC: 0x2f // 47
, DNSKEY: 0x30 // 48
, DHCID: 0x31 // 49
, NSEC3: 0x32 // 50
, NSEC3PARAM: 0x33 // 51
, TLSA: 0x34 // 52
, HIP: 0x37 // 55
, CDS: 0x3b // 59
, CDNSKEY: 0x3c // 60
, SPF: 0x63 // 99
, TKEY: 0xf9 // 249
, TSIG: 0xfa // 250
, IXFR: 0xfb // 251
, AXFR: 0xfc // 252
, ANY: 0xff // 255
, CAA: 0x101 // 257
, TA: 0x8000 // 32768
, DLV: 0x8001 // 32769
};
// and in reverse
Object.keys(types).forEach(function (key) {
for (var key in types) {
types[types[key]] = key;
});
}
}('undefined' !== typeof window ? window : exports));
{
"name": "dns-suite",
"version": "1.0.3",
"version": "1.1.0",
"description": "testing dns",

@@ -5,0 +5,0 @@ "main": "dns.js",

@@ -18,10 +18,10 @@ (function (exports) {

record.data.split('.').forEach(function (label) {
cnameLen += 1 + label.length;
dv.setUint8(total, label.length, false);
cnameLen += 1 + label.length;
dv.setUint8(total, label.length, false);
total += 1;
label.split('').forEach(function (ch) {
dv.setUint8(total, ch.charCodeAt(0), false);
total += 1;
label.split('').forEach(function (ch) {
dv.setUint8(total, ch.charCodeAt(0), false);
total += 1;
});

@@ -28,0 +28,0 @@ });

(function (exports) {
'use strict';
// TODO. Not yet implemented
// Value Meaning/Use

@@ -12,11 +10,58 @@ // Primary NS Variable length. The name of the Primary Master for the domain. May be a label, pointer, or any combination

// Retry Interval Unsigned 32-bit integer
// Retry Interval Unsigned 32-bit integer
// Expiration Limit Unsigned 32-bit integer
// Minimum TTL Unsigned 32-bit integer
var unpackLabels = exports.DNS_UNPACK_LABELS || require('../dns.unpack-labels.js').DNS_UNPACK_LABELS;
exports.DNS_PARSER_TYPE_SOA = function (ab, packet, record) {
var rdataAb = ab.slice(record.rdstart, record.rdstart + record.rdlength);
var dv = new DataView(rdataAb);
// we need this information for this parser
var cpcount = unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' }).cpcount;
var offset = unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' }).byteLength;
var labels = unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' }).labels;
// Primary NS
record.name_server = unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' }).name;
// if there exists compression pointers in the rdata
if (cpcount > 0){
// do something awesome with compression pointers to get the email address
// I need the length of all the data before the email address starts.
// if there are compression pointers then there will be a byte to indicate the length of each label, the label,
// then there will be a compression pointer to grab the longest label.
var start = 2; // start or email_addr. take into account compression pointer and address length
for(var i = 0; i < labels.length; i++){
// increase start by the label length. the +1 is to take into account the next label size byte
start = start + labels[i].length + 1;
// check for cpcount. 2 counts behind
if(parseInt(dv.getUint8(start - 2), 10) === 192){
record.email_addr = unpackLabels(new Uint8Array(ab), record.rdstart + start ,{ byteLength: 0, cpcount: 0, labels: [], name: '' }).name;
}
}
} // if there are no compression pointers, we can get the email address directly from the offset
else {
record.email_addr = unpackLabels(new Uint8Array(ab), record.rdstart + offset, { byteLength: 0, cpcount: 0, labels: [], name: '' }).name;
}
// Serial Number
record.sn = dv.getUint32(dv.byteLength - 20, false);
// Refresh Interval
record.ref = dv.getUint32(dv.byteLength - 16, false);
// Retry Interval
record.ret = dv.getUint32(dv.byteLength - 12, false);
// Expiration Limit
record.ex = dv.getUint32(dv.byteLength - 8, false);
// Minimum TTL
record.nx = dv.getUint32(dv.byteLength - 4, false);
return record;
};
}('undefined' !== typeof window ? window : exports));
(function (exports) {
'use strict';
// TODO. Not yet implemented

@@ -5,0 +4,0 @@ // SRV identifies the host(s) that will support a particular service. It

@@ -51,7 +51,6 @@ dns-suite

Install
Install with git
-------
You can use git to install v1.x (and get updates) or just v1.0.x (and only get patches).
The API will not break until v2.
You can use git to install v1.x like so:

@@ -63,6 +62,19 @@ ```bash

Don't have git? You can bow down to the gods of the centralized, monopolized, concentrated, dictatornet
(as we like to call it here at Daplie Labs):
If you want to be more specific to v1.0.x or exactly v1.0.2 you can do so like this:
```
# latest of v1.0.x
npm install 'git+https://git@git.daplie.com:Daplie/dns-suite#v1.0'
# exactly v1.0.2
npm install 'git+https://git@git.daplie.com:Daplie/dns-suite#v1.0.2'
```
Install without git
-------
Don't have git? Well you can also bow down to the gods of the centralized, monopolized, concentrated, dictatornet
(as we like to call it here at Daplie Labs), if that's how you roll:
```
npm install --save dns-suite

@@ -173,3 +185,3 @@ ```

1) Update `dns.types.js`
1) Update `dns.types.js` if it's not there already.

@@ -176,0 +188,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc