arp-listener
Advanced tools
Comparing version 0.0.0 to 1.0.0
var arpListener = require('./') | ||
arpListener('wlan0', function(arpData) { | ||
arpListener('wlp58s0', function (arpData) { | ||
console.log(arpData) | ||
}) | ||
}) |
19
index.js
@@ -16,14 +16,8 @@ | ||
function bufferToProtocolAddress(buffer) { | ||
return buffer.readUIntBE(0, 1) + '.' + buffer.readUIntBE(1, 1) + '.' + buffer.readUIntBE(2, 1) + '.' + buffer.readUIntBE(3, 1) | ||
} | ||
function listen (iface, arpPacketListener) { | ||
var pcapSession = pcap.createSession(iface, 'arp') | ||
function listen (interface, arpPacketListener) { | ||
pcapSession.on('packet', function (rawPacket) { | ||
var packet = pcap.decode.packet(rawPacket).payload.payload | ||
var pcapSession = pcap.createSession(interface, 'arp') | ||
pcapSession.on('packet', function(rawPacket) { | ||
var packet = pcap.decode.packet(rawPacket).payload.payload; | ||
packet.sender_ha = bufferToHardwareAddress(new Buffer(packet.sender_ha.addr)) | ||
@@ -33,8 +27,5 @@ packet.target_ha = bufferToHardwareAddress(new Buffer(packet.target_ha.addr)) | ||
arpPacketListener(packet) | ||
}) | ||
} | ||
module.exports = listen | ||
module.exports = listen |
{ | ||
"name": "arp-listener", | ||
"version": "0.0.0", | ||
"version": "1.0.0", | ||
"description": "ARP Scan", | ||
@@ -25,4 +25,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"pcap": "^2.0.1" | ||
"pcap": "https://github.com/mranney/node_pcap.git#d920204745c8b00ef4b7a3fe27d902b263cdb70f" | ||
} | ||
} |
HTTP dependency
Supply chain riskContains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
1882
25
1
1
- Removednan@2.22.0(transitive)
- Removedpcap@2.1.0(transitive)
Updatedpcap@https://github.com/mranney/node_pcap.git#d920204745c8b00ef4b7a3fe27d902b263cdb70f