A high-performance, cross-platform, and feature-rich port scanner written in C, powered by libuv.
SuperScan-UV is an experimental project designed to explore high-performance network scanning using modern C and asynchronous I/O. It is built to be a fast, flexible, and powerful tool for network reconnaissance, capable of managing thousands of concurrent connections efficiently.
This is an experimental project created to implement a modern, high-performance port scanner in C. The feature set, command-line arguments, and overall user experience were heavily inspired by the excellent RustScan project. SuperScan-UV aims to serve as a C-language counterpart to RustScan's design philosophy, leveraging the power of libuv for its asynchronous core.
- Asynchronous Core: Built on
libuv, allowing for high-throughput, non-blocking I/O to manage thousands of concurrent connections with minimal resource usage. - Cross-Platform: Compiles and runs on both POSIX-compliant systems (Linux, macOS) and Windows.
- Flexible Target Specification: Scan multiple targets at once, with support for:
- Hostnames (
example.com) - IPv4/IPv6 addresses (
8.8.8.8,2606:4700:4700::1111) - CIDR ranges (
192.168.0.0/24) - IP ranges (
10.0.0.1-10.0.0.100) - Comma-separated lists of any of the above.
- Hostnames (
- Advanced Port Selection:
- Scan specific ports and ranges (
-p 80,443,1000-2000). - Scan the top 1000 most common ports (
--top-ports). - Exclude specific ports from a scan (
-e 8080).
- Scan specific ports and ranges (
- Multi-Core Scaling: Automatically utilizes all CPU cores for scanning large target lists with multi-processing (
--processes 0). - Advanced Scan Tuning:
- Manually set concurrency (
-b), timeout (-t), and file descriptor limits (-u). - Auto-Tuning (
--auto-tune): Enable dynamic timeout adjustment and a TCP-like congestion window to automatically optimize for network conditions.
- Manually set concurrency (
- Service & Version Detection:
- Banner grabbing to identify service versions (
-sV). - UDP scanning with protocol-specific payloads to elicit responses (
--udp).
- Banner grabbing to identify service versions (
- Powerful Scripting Engine: Pipe scan results directly to other tools like
nmapfor further analysis.superscan -a example.com -p 22,80 -- nmap -sV -A {{ip}} -p {{ports}}
- Multiple Output Formats:
- Human-readable (default).
- Greppable format for easy parsing (
-g). - CSV file output (
--output-csv).
SuperScan-UV depends on libuv. You must have it installed to compile the project.
# Install dependencies
sudo apt-get update
sudo apt-get install -y libuv1-dev build-essential
# Compile
gcc -O2 superscan.c -o superscan -luv# Install dependencies
brew install libuv
# Compile
gcc -O2 superscan.c -o superscan -luvYou will need to download the pre-compiled libuv binaries or build it from source. Ensure uv.h is in your include path and uv.lib is in your library path.
gcc superscan.c -o superscan.exe -luv -lws2_32 -liphlpapi -lwsock32 -luserenvgcc superscan.c -o superscan.exe -static -luv -lws2_32 -liphlpapi -lwsock32 -luserenv -ldbghelp -lole32# Compile using Developer Command Prompt for VS
cl.exe superscan.c /O2 /link /OUT:superscan.exe uv.lib ws2_32.lib Iphlpapi.lib Userenv.lib Bcrypt.libUsage: superscan -a <targets> [options] [-- <script_command>]
<targets> can be a comma-separated list of hostnames, IPs, or CIDR ranges (IPv4 only).
Primary Options:
-a, --addresses <targets> The target(s) to scan.
-x, --exclude <targets> Exclude targets from the scan (IP, CIDR, host).
-p <ports> Ports to scan (e.g., 80,443,1000-2000).
--top-ports Scan the top 1000 most common ports.
-e <ports> Exclude ports from the scan (e.g., 80,443).
Scan Tuning:
--random-scan Randomize the order of ports scanned.
-b <number> Concurrency (default: 5192).
-t <ms> Connect timeout (default: 1000).
-u <number> Set file descriptor limit (Unix-like only).
--processes <number> Enable multi-process mode (default: 1, 0=CPU cores).
--auto-tune Enable dynamic timeout and congestion control.
-sV Enable banner grabbing.
--udp Enable UDP scan mode.
Output:
-g, --greppable Output in a machine-readable format.
--output-csv <path> Save results to a CSV file.
-h, --help Show this help message.
Scripting Engine:
-- <command> Execute an external command after each scan.
Placeholders: {{ip}} and {{ports}}.
Example: superscan -a scanme.nmap.org,192.168.0.0/24 -p 22,80 -- nmap -sV -p {{ports}} {{ip}}
Scan a single host for common web ports:
./superscan -a example.com -p 80,443,8000,8080,8443Scan a whole subnet for the top 1000 TCP ports:
./superscan -a 192.168.1.0/24 --top-portsScan a list of hosts from a file (using xargs):
cat host_list.txt | xargs -I {} ./superscan -a {} -p 22,80High-performance scan using all CPU cores and auto-tuning: This command scans a large IP range for all ports, automatically distributing the work across all available CPU cores and dynamically adjusting timeouts.
./superscan -a 10.0.0.0/16 -p 1-65535 --processes 0 --auto-tuneBanner grabbing with high concurrency:
./superscan -a example.com -p 1-1000 -b 2000 -sVPiping results to Nmap for deep analysis: Find open ports with SuperScan quickly, then pass only the open ports to Nmap for OS detection, version scanning, and script execution.
./superscan -a scanme.nmap.org -p 1-1000 --top-ports -- \
nmap -sV -sC -O -p {{ports}} {{ip}}UDP Scan for common services:
./superscan -a 8.8.8.8 --udp -p 53,123,161Save results to a CSV file:
./superscan -a 192.168.0.0/24 -p 21,22,25,80,443 --output-csv results.csv