A high-performance, multi-threaded port scanner built with C++ and Winsock2.
- Fast Multi-threading: Scan thousands of ports in seconds using a configurable thread pool.
- Service Detection: Automatically identifies common services like HTTP, SSH, FTP, etc.
- Banner Grabbing: Retrieves identification strings from open ports.
- Interactive UI: Clean, colorized terminal interface with a progress bar.
- Customizable: Choose target IP, port ranges, and thread counts.
To compile this project on Windows, you need a C++ compiler. Recommended options:
- MinGW-w64: Provides
g++. (Download from mingw-w64.org) - Visual Studio: Includes
cl.exe. (Download Visual Studio Community)
Open your terminal and run:
g++ port_scanner.cpp -o port_scanner.exe -lws2_32cl /EHsc port_scanner.cpp /link ws2_32.lib- Run the compiled
port_scanner.exe. - Enter the target IP (e.g.,
127.0.0.1for local scan). - Enter the start and end port numbers (e.g.,
1to1000). - Enter the number of threads (e.g.,
100for fast scanning). - Watch the progress bar and wait for results!
Scanning 127.0.0.1...
[==================================================] 100%
Scan Results for 127.0.0.1:
PORT SERVICE BANNER
--------------------------------------------------------
135 RPC No banner
445 Microsoft-DS No banner
Scan completed in 11.20 seconds.