Skip to content

xorz57/PortScanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PortScanner

Build

Usage

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

./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:

How to Build

Linux & macOS

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

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