We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I am trying to filter the traffic using this syntax but it's throwing me an error when I try to run it.
const interface = 'en0'; let filter = 'src host xxx.xx.xx.xx \\udp'; const pcap = require('pcap'), pcap_session = pcap.createSession(interface, filter); pcap_session.on('packet', function (raw_packet) { let packet = pcap.decode.packet(raw_packet); console.log(packet); console.log('======================'); });
This error :
this.link_type = this.session.open_live(this.device_name, this.filter, this.buffer_size, this.outfile, packet_ready, this.is_monitor); Error: syntax error in filter expression: syntax error
I've looked at the man of pcap-filter and they say :
src host host True if the IPv4/v6 source field of the packet is host.
Have I done something wrong ? or how can I only listen to udp package where the src host is a specific id ?
NB: I also try to add a "greater 1200" in the filter but it gives me a syntax error as well. How can I do that ?
Thanks !
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I am trying to filter the traffic using this syntax but it's throwing me an error when I try to run it.
This error :
I've looked at the man of pcap-filter and they say :
Have I done something wrong ? or how can I only listen to udp package where the src host is a specific id ?
NB: I also try to add a "greater 1200" in the filter but it gives me a syntax error as well. How can I do that ?
Thanks !
The text was updated successfully, but these errors were encountered: