node_pcap icon indicating copy to clipboard operation
node_pcap copied to clipboard

Packet Capture Inconsistency

Open edtguy opened this issue 7 years ago • 0 comments

Is there a pcap error event I should be monitoring? I thought I was successfully monitoring wifi traffic, but when I set up two identical devices side by side, I'm getting significantly different results from each device. The core of the code is essentially the following:

const execSync = require('child_process').execSync
const cmd = `/sbin/ifconfig ${wifiAdapter} down; /sbin/iwconfig ${wifiAdapter} mode monitor; /sbin/ifconfig ${wifiAdapter} up`;
execSync(cmd)
const pcap = require('pcap')
const pcapSession=pcap.createSession(wifiAdapter,'wlan type mgt subtype probe-req')
pcapSession.on('packet',function(rawPacket){
    var packet = pcap.decode.packet(rawPacket)
    processPacketInfo(packet)
})

edtguy avatar Jan 08 '19 17:01 edtguy