Skip to the content.

Client Agent Documentation

The Port Scanner Client Agent is a distributed scanning component that performs network scans on behalf of the central server.

Table of Contents

Overview

The client agent:

Key Features

Quick Start

# Install dependencies
pip install .

# Run config wizard
portscanner-client-config

# Run client (requires root for SYN scans)
portscanner-client

Architecture

┌────────────────────────────────────┐
│         Client Agent               │
│                                    │
│  ┌──────────────────────────────┐  │
│  │   Flask HTTP Server          │  │
│  │   - /health                  │  │
│  │   - /scan (receive tasks)    │  │
│  │   - /approve                 │  │
│  └──────────────────────────────┘  │
│                                    │
│  ┌──────────────────────────────┐  │
│  │   Scan Executor              │  │
│  │   - ThreadPoolExecutor       │  │
│  │   - Nmap Integration         │  │
│  └──────────────────────────────┘  │
│                                    │
│  ┌──────────────────────────────┐  │
│  │   Heartbeat Service          │  │
│  │   - Registration             │  │
│  │   - Status Updates           │  │
│  └──────────────────────────────┘  │
└────────────────────────────────────┘

Endpoints

Health Check

GET /health

Returns client status and system information.

Receive Scan Task

POST /scan

Receives scan task from server and executes it.

Approve Client

POST /approve

Marks client as approved (called by server).

Next Steps