A high-performance network scanner optimized for macOS (Apple Silicon/Intel), designed to identify active hosts and open ports within a local subnet.
- Language: C++ (Standard 17 or higher)
- Target OS: macOS (Darwin)
- Libraries:
libpcap(for packet capture),std::thread(for concurrency). - Build System: CMake
The application follows a modular design:
- Scanner Engine: Core logic for ARP/ICMP scanning and TCP SYN probing.
- Discovery Module: Handles network interface detection using macOS-improved APIs.
- ARP Scanner Module: Dedicated module for low-level ARP request/reply analysis.
- Reporter: Formats scan results into human-readable console output or JSON.
graph TD
A[User Command] --> B[Scanner Engine]
B --> C[Discovery Module]
C --> D[Network Interface Discovery]
D --> E[ARP/ICMP Probing]
E --> F[TCP Port Scanning]
F --> G[Result Formatter]
G --> H[Console/JSON Output]
NetScannerMacOS/
├── CMakeLists.txt
├── src/
│ ├── main.cpp
│ ├── scanner.cpp
│ ├── discovery.cpp
│ ├── reporter.cpp
│ ├── logger.cpp
│ └── arp_scanner.cpp
├── include/
│ ├── scanner.hpp
│ ├── discovery.hpp
│ ├── reporter.hpp
│ ├── logger.hpp
│ └── arp_scanner.hpp
├── tests/
│ └── test_scanner.cpp
└── README.md
- Phase 1: Setup - Configure CMake and verify
libpcapavailability on macOS. - Phase 2: Discovery - Implement host discovery using ARP/ICMP.
- Phase 3: Port Scanning - Implement asynchronous TCP port probing.
- Phase 4: Reporting - Develop the output formatting module.
While designed for macOS, the logic can be ported to Linux via minor adjustments to the interface detection module.