A tiny Rust utility that scans a PCAP file, extracts every IP seen, and summarizes:
- total inbound / outbound connections trial per host
- interesting source ports (ignores ephemeral ports ≥ 49152)
- source ⇄ destination link counts
Configuration comes from a simple JSON file:
{
"networks": [
{ "name": "Lab", "ip_cidr": "192.168.0.0/24" },
{ "name": "Prod", "ip_cidr": "10.0.0.0/16" }
]
}Only hosts inside the listed CIDRs are reported.
cargo build --release
./target/release/network_mapperconfig.jsonmust sit next to the binary.example.pcap(or any file you choose) is parsed at runtime.
Pretty-printed JSON (output.json) containing:
[
{
"ip": "192.168.0.10/32",
"ports": [22, 443],
"nb_connections_src": 14,
"nb_connections_dst": 3
}
]A console summary is also displayed while parsing.