Skip to content

Latest commit

 

History

History
154 lines (126 loc) · 4.69 KB

File metadata and controls

154 lines (126 loc) · 4.69 KB

netprobe

A lightweight CLI network diagnostic toolkit written in C++17. No external dependencies, just the standard library and OS sockets.

Features

  • TCP Ping - connectivity check via TCP connect probe (no root required)
  • Port Scanner - scan a range of ports on any host
  • DNS Lookup - resolve hostnames to IPv4/IPv6 addresses
  • HTTP Probe - check HTTP status, headers, and response time
  • Latency Measurement - measure and classify connection latency
  • Traceroute - ICMP-based route tracing with reverse DNS
  • Bandwidth Test - measure download speed from a URL

Build

mkdir build && cd build
cmake ..
cmake --build .

On Windows with MSVC:

mkdir build && cd build
cmake ..
cmake --build . --config Release

Usage

netprobe <command> <target> [options]

Commands

Command Description
ping TCP connect probe to host:port
scan Scan a range of ports on a host
dns Resolve hostname to IP addresses
http Check HTTP status of a URL
latency Measure connection latency
trace Traceroute to a host (ICMP)
whois WHOIS domain registration lookup
bandwidth Download speed test from a URL

Options

Option Description
-p, --port <port> Target port (default: 80)
-r, --range <s-e> Port range for scan (default: 1-1024)
-c, --count <n> Number of ping probes (default: 4)
-t, --timeout <ms> Timeout in milliseconds (default: 3000)
-m, --max-hops <n> Max hops for traceroute (default: 30)
-s, --size <mb> Limit download size for bandwidth test
-j, --json Output results as JSON
-h, --help Show help
-v, --version Show version

Examples

TCP Ping:

netprobe ping google.com -p 443 -c 10

Port Scan:

netprobe scan 192.168.1.1 -r 20-1000

DNS Lookup:

netprobe dns github.com

HTTP Probe:

netprobe http http://example.com

Latency Check:

netprobe latency google.com -p 443

Traceroute:

netprobe trace google.com
netprobe trace 8.8.8.8 -m 20

WHOIS Lookup:

netprobe whois github.com
netprobe whois example.com --json

Bandwidth Test:

netprobe bandwidth http://cachefly.cachefly.net/10mb.test
netprobe bandwidth http://cachefly.cachefly.net/100mb.test -s 10

JSON Output (works with any command):

netprobe dns github.com --json
netprobe scan 192.168.1.1 -r 20-80 --json

Platform Support

  • Windows (Winsock2)
  • Linux
  • macOS

License

MIT


developed by qorex