Day 018 / Python / TCP Diagnostics

Port Probe Report

View source ↗Scroll to explore ↓
Port Probe Report project cover
/ Overview

A dependency-free Python CLI that checks an explicit, bounded list of TCP ports and reports open, closed, timed-out or failed connections.

NamePort Probe Report

Client100 Days of Code

IndustriesDeveloper and operations tooling

Date2026

/ Challenge

A failed connection does not always mean the same thing: the service may accept TCP connections, refuse them, time out behind a firewall, or fail because the host cannot be resolved. Ad-hoc checks also need firm scope limits.

/ Provided services

Clear thinking.
Practical delivery.

01

Safe diagnostic scope

Limited every run to one host, explicit ports and a maximum 100-port range, with a clear authorization reminder.

02

Honest failure classification

Distinguished accepted, refused, timed-out and operating-system errors instead of reducing every failure to a misleading closed state.

03

Automation-ready output

Produced stable terminal and JSON reports with useful exit codes while injecting network dependencies for deterministic tests.

Port Probe Report feature visual
/ Solution

Port Probe Report validates one authorized host and at most 100 explicit TCP ports, applies a per-port timeout, and classifies every result as open, closed, timeout or error. It reports known service names and connection latency in readable text or JSON without attempting vulnerability discovery or UDP scanning.

/ Impact

Four explicit connection states

Bounded checks of up to 100 ports

Readable and JSON reports

Eight deterministic network-free tests

/ Tech stack

Python standard library

socket, argparse, dataclasses, time and json provide the complete dependency-free utility.

TCP diagnostics

Explicit connection attempts and timeouts provide a small first-pass reachability report without vulnerability scanning.

Unittest

Eight network-free tests cover parsing, bounds, latency, refused connections, timeouts, operating-system errors and output consistency.

Next project

Shipment SaaS System

View case study ↗