cocowalla / Snifter

Snifter is a raw socket IP packet capturing library/app for Windows, with a tiny CPU and memory footprint
Apache License 2.0
43 stars 17 forks source link

Feature Request - time/packet count #5

Open ghost opened 5 years ago

ghost commented 5 years ago

Would it be at all possible to add a time to stop sniffing and packet count to stop sniffing option to this?

(Pretty much just the features from RawCap that I find pretty useful, especially when running the tool on a remote computer).

F:\Tools>RawCap.exe --help
NETRESEC RawCap version 0.1.5.0
http://www.netresec.com

Usage: RawCap.exe [OPTIONS] <interface_nr> <target_pcap_file>

OPTIONS:
 -f          Automatically flush data to file after each packet (no buffer)
 -c <count>  Stop sniffing after receiving <count> packets
 -s <sec>    Stop sniffing after <sec> seconds

https://www.netresec.com/?page=RawCap

Many thanks, love this tool!

cocowalla commented 5 years ago

Not features I'd likely use myself, but I can see how they could be useful to others - thanks for the feedback :+1:

SocketSniffer already tracks how many packets have been captured, so this should be straightforward to add. Having said that, I have very limited capacity at present, so it might be a while before I get round to it. If you don't want to wait, I'd be happy to take a PR for this.