How chleba/netscanner works
netscanner is a terminal network-scanning and diagnostics application. Users select an interface and scan a CIDR for IPv4 hosts, then inspect hosts, TCP ports, captured packets, and traffic; they can also scan Wi-Fi networks, view signal charts, filter packet logs, and export results. The app coordinates a Ratatui event loop and feature components through actions. The README documents these capabilities; sampled source confirms parts of the event, packet-capture, discovery, and port-scan behavior, while wiring for unsampled components is not inferred.
Main entry points: app.rs App coordinator · action.rs Action messages · discovery.rs CIDR discovery · ports.rs TCP port scan
Components 23
Application runtime
- Program entry
src/main.rs - CLI options
src/cli.rs - App coordinator
src/app.rs - Terminal events
src/tui.rs - Keybindings config
src/config.rs - Action messages
src/action.rs
Network discovery
- Interface selection
src/components/interfaces.rs - CIDR discovery
src/components/discovery.rs - TCP port scan
src/components/ports.rs - Network services
Traffic inspection
- Packet capture
src/components/packetdump.rs - Traffic accounting
src/components/sniff.rs - Traffic chart
src/widgets/scroll_traffic.rs
Wi-Fi tools
- Wi-Fi scanning
src/components/wifi_scan.rs - Wi-Fi interface
src/components/wifi_interface.rs - Signal chart
src/components/wifi_chart.rs
Results and export
- CSV export
src/components/export.rs - Packet logs and filters
src/components/packetdump.rs
Other components
- Operator
- Host network
- Wi-Fi scan service
- DNS lookup
- CSV files
Connections 33
- Operator → Program entry: starts
- Program entry → CLI options: parses options
- Program entry → App coordinator: runs
- Operator → Terminal events: provides input
- Terminal events → App coordinator: sends events
- App coordinator → Keybindings config: reads bindings
- App coordinator → Interface selection: dispatches events
- App coordinator → CIDR discovery: dispatches events
- App coordinator → TCP port scan: dispatches actions
- App coordinator → Packet capture: dispatches actions
- App coordinator → Traffic accounting: dispatches actions
- App coordinator → Wi-Fi scanning: dispatches events
- App coordinator → Wi-Fi interface: dispatches events
- App coordinator → Signal chart: dispatches events
- App coordinator → CSV export: dispatches export
- Interface selection → Action messages: emits actions
- CIDR discovery → Action messages: emits scan results
- TCP port scan → Action messages: emits scan results
- Packet capture → Action messages: emits packets
- App coordinator → Action messages: routes actions
- Interface selection → Host network: lists interfaces
- CIDR discovery → Host network: probes hosts
- TCP port scan → Host network: tests TCP ports
- Packet capture → Host network: captures packets
- CIDR discovery → DNS lookup: resolves hostnames
- TCP port scan → DNS lookup: looks up names
- Wi-Fi scanning → Wi-Fi scan service: scans networks
- App coordinator → Traffic accounting: delivers packet actions
- Traffic accounting → Traffic chart: renders traffic
- Packet capture → Packet logs and filters: records and filters
- CSV export → CSV files: writes exports
- App coordinator → Wi-Fi interface: selects active interface
- Wi-Fi scanning → Signal chart: provides signal data