https://github.com/xorz57/portscanner
Port Scanner written in C++20
https://github.com/xorz57/portscanner
cpp port-scanner tcp-port-scanner
Last synced: over 1 year ago
JSON representation
Port Scanner written in C++20
- Host: GitHub
- URL: https://github.com/xorz57/portscanner
- Owner: xorz57
- License: mit
- Created: 2023-11-13T10:19:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-18T23:23:14.000Z (about 2 years ago)
- Last Synced: 2025-01-29T16:27:46.022Z (over 1 year ago)
- Topics: cpp, port-scanner, tcp-port-scanner
- Language: C++
- Homepage:
- Size: 51.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PortScanner
[](https://github.com/xorz57/PortScanner/actions/workflows/Build.yml)
## Usage
```bash
Allowed options:
--help display help message
--host arg (=127.0.0.1) set host
--port arg (=0-1024) set port range in the format 'begin[-end]'
--show arg (=open) display only 'open', 'closed', or 'all' ports
```
## Example
```bash
./PortScanner --host boost.org
Port 25/tcp is open.
Port 22/tcp is open.
Port 80/tcp is open.
Port 443/tcp is open.
Port 587/tcp is open.
Port 8080/tcp is open.
```
## Dependencies
PortScanner relies on the following libraries:
- [asio](https://github.com/boostorg/asio)
- [program_options](https://github.com/boostorg/program_options)
## How to Build
#### Linux & macOS
```bash
git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
~/vcpkg/bootstrap-vcpkg.sh
git clone https://github.com/xorz57/PortScanner.git
cd PortScanner
cmake -B build -DCMAKE_BUILD_TYPE=Release -S . -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build --config Release
ctest --build-config Release
```
#### Windows
```powershell
git clone https://github.com/microsoft/vcpkg.git C:/vcpkg
C:/vcpkg/bootstrap-vcpkg.bat
C:/vcpkg/vcpkg.exe integrate install
git clone https://github.com/xorz57/PortScanner.git
cd PortScanner
cmake -B build -DCMAKE_BUILD_TYPE=Release -S . -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build --config Release
ctest --build-config Release
```