I try to work on packet with cap but is not work. I have try the default code :
const Cap = __cap.Cap
const decoders = __cap.decoders
const PROTOCOL = decoders.PROTOCOL
var c = new Cap();
var device = Cap.findDevice('192.168.0.10');
var filter = 'tcp and dst port 80';
var bufSize = 10 * 1024 * 1024;
var buffer = Buffer.alloc(65535);
console.log(device);
But every time Cap.findDevice return undefine. I have install npcap with WinPcap compatibility. I have try to a lot of different ip but no one work.
Some one have an answer ?
Thank in advance. Have a good day.
Ok that's my bad i dont understand the ip is for the listening interface , i was think is the remote ip. So i have put my ip and is work.