Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

snoopy

> 编程语言
Open source

A highly configurable multi-threaded packet sniffer and parser build in rust-lang.

179 stars0 likes0 views
WebsiteGitHub

About

A highly configurable multi-threaded packet sniffer and parser build in rust-lang.

Snoopy

A highly configurable multi-threaded packet sniffer and parser build in rust-lang.

Features

  • Capturing packets and encoding them to Pcap files, or print them onto console.
  • While capturing packets, various configuration parameters can be specified.
  • Parse Pcap files and print them to console, or extract more verbose information from each packet and store them to JSON file.
  • Multi-threaded parsing of packets.
  • Filter packets while parsing and capturing.
  • Currently supports the following protocols :
    • Ethernet
    • Ipv4
    • Ipv6
    • Arp
    • Tcp
    • Udp
    • Dns
    • Tls

the Json file is generated like given below :

json

[{
  "Ok": {
    "len": 11,
    "timestamp": "1234567890.123456",
    "headers": [{
        "Tls": {
          ...
        }
      },
      {
        "Tcp": {
          ...
        }
      }, {
        "Ipv4": {
          ...
        }
      }, {
        "Ether": {
          ...
        }
      }
    ],
    "remaining": [...]
  }
},
...
]

Installation

Ensure that you have libpcap-dev (ubuntu) or the corresponding package installed on your system. Run the following commands in the command line inside the folder :

bash
cargo install snoopy

Quick-Start

To Capture packets and print them onto the console :

…

Capture packets and save them to Pcap files :

bash
➜ sudo snoopy capture run --timeout 10000 --savefile captured.pcap

Note: For capturing packets the user needs root user permissions to capture network packets.

Parse Pcap files and print to console:

bash
➜ snoopy parse ./Sample/captured.pcap

Parse Pcap files and print to console (with filters):

bash
➜ snoopy parse ./Sample/captured.pcap --filter "tcp port 443"

The above command will print all TCP packets with source/destination port 443.

Parse Pcap files and save to JSON file:

bash
➜ snoopy parse ./Sample/captured.pcap --savefile ./parsed.json

Documentation

All commands and sub-commands are listed below :

bash
USAGE:
    snoopy [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    capture    Capture packets from interfaces.
    help       Prints this message or the help of the given subcommand(s)
    parse      Parse pcap files.
bash
USAGE:
    snoopy capture [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    help    Prints this message or the help of the given subcommand(s)
    list    List all interfaces.
    run     Start capturing packets.
…
bash
USAGE:
    snoopy parse [OPTIONS] 

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -f, --filter         Set filter to the capture using the given BPF program string.
    -s, --savefile     Parse the packets into JSON and save them to memory.

ARGS:
       

Note: The filters can be defined according to the syntax specified here.

Docker

Run the following commands in the command line inside the folder :

bash
docker build -t snoopy .
docker container run -it snoopy

Build

Run the following command in the command line inside the folder :

bash
cargo build

Todo

  • Benchmarking
  • Support for other protocols

License

This project is under the MIT license.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustcommand-line-toolpacket-capturepacket-parsingpacket-sniffer

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言