Gathering detailed insights and metrics for mdns-discovery
Gathering detailed insights and metrics for mdns-discovery
Gathering detailed insights and metrics for mdns-discovery
Gathering detailed insights and metrics for mdns-discovery
npm install mdns-discovery
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
4 Stars
12 Commits
2 Forks
4 Watching
1 Branches
1 Contributors
Updated on 22 Oct 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
3.9%
238
Compared to previous day
Last week
5.8%
1,960
Compared to previous week
Last month
-18%
8,476
Compared to previous month
Last year
-33.7%
108,989
Compared to previous year
3
###mdns Multicast DNS
####Some Examples:
Find all Amazon Fire TV devices on the local network:
1
2var Mdns = require('mdns-discovery');
3
4var mdns = new Mdns({
5 timeout: 4,
6 returnOnFirstFound: true,
7 name: '_amzn-wplay._tcp.local',
8 find: 'amzn.dmgr:'
9});
10mdns.run (function(res) {
11 res.forEach(enry) {
12 console.log(entry);
13 }
14});
List all mdns questions and answers for 10 seconds:
1var Mdns = require('mdns-discovery'); 2 3var mdns = new Mdns({ timeout: 10 }); 4mdns.on('packet', function (packets, rinfo) { 5 if (packets.answers) packets.answers.forEach(function(packet, i) { 6 console.log(`A: ${rinfo.address} - packet[${i}]=${packet.name}, type=${packet.type}, class=${packet.class}, ttl=${packet.ttl}}`); 7 }); 8 if (packets.questions) packets.questions.forEach(function(packet, i) { 9 console.log(`Q: ${rinfo.address} - packet[${i}]=${packet.name}, type=${packet.type}, class=${packet.class}, ttl=${packet.ttl}}`); 10 }); 11}); 12mdns.run ();
Presence:
1var mdns = require('mdns-discovery')(); 2 3mdns.onIP('192.168.1.31', function (packet, rinfo) { 4 if (packet.answers.length) { 5 console.log(rinfo.address + ' is present'); 6 } 7}).run ();
Filter:
1var mdns = require('mdns-discovery')(); 2 3var mdns = Mdns({ 4 timeout: 3, 5 name: '_amzn-wplay._tcp.local', 6 find: 'amzn.dmgr:' 7}); 8 9var allreadyUsed = [ {ip: '192.168.1.94'}, {ip: '192.168.1.91'} ]; 10 11mdns.setFilter('ip', allreadyUsed).run (function(res) { 12 res.forEach(function(v) { 13 console.log(v); 14 }); 15});
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/12 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More