Skip to main content

Pyprobe

Pyprobe is a command-line tool and Python package for scanning TCP ports, identifying potentially running services, and exporting scan results to JSON. Built from scratch using Python's socket and concurrency capabilities, it aims to make network reconnaissance accessible through both a CLI and a reusable Python API.

Features

Feature Description
Asynchronous Scanning Uses asyncio and asyncio.to_thread() to scan multiple ports concurrently.
TCP Port Scanning Identifies accessible TCP ports on a target host.
Service Detection Attempts to identify services using port mappings and service signatures.
Terminal Output Displays scan results in a formatted table using Rich. Use -v for verbose logging.
JSON Export Saves discovered ports and service information to a JSON file.
Specific Port Scanning Scan specific ports on the target with -p
Custom Timeouts Set a custom timeout for each TCP connection
CLI and Python API Designed for terminal use and integration into Python programs.
SYN Scanning Use SYN scanning for port discovery with -sS

Installation

Install from PyPI

install it with:

pip install pyprobe-scan

Install from source

Clone the repository:

git clone https://github.com/fourtysevencode/pyprobe.git
cd pyprobe

Create and activate a virtual environment:

python3 -m venv .venv
source .venv/bin/activate

Install the project in editable mode:

python -m pip install -e .

Project Structure

pyprobe
├── dist/
│   ├── pyprobe_scan-0.1.6-py3-none-any.whl
│   └── pyprobe_scan-0.1.6.tar.gz
├── docs/
│   ├── demo-screenshots/
│   │   └── dummy-help-scan.png
│   └── ESP_Demo/
│       └── pic.jpeg
├── src/
│   └── pyprobe/
│       ├── services/
│       │   ├── __init__.py
│       │   ├── common_service_signatures.py
│       │   ├── commonly_used_ports.py
│       │   ├── find_service.py
│       │   ├── scan_port.py
│       │   └── syn_scan.py
│       ├── __init__.py
│       ├── __main__.py
│       ├── cli_args.py
│       ├── cli.py
│       ├── output.py
│       └── scanner.py
├── tests/
│   ├── Dummy_ESP32_Server/
│   │   └── Dummy_ESP32_Server.ino
│   └── package_tests/
│       └── test_scan.py
├── .gitignore
├── pyproject.toml
└── README.md

Usage

Display help

pyprobe-scan --help

Scan a target

pyprobe-scan 127.0.0.1

Replace 127.0.0.1 with the IP address of a host you own or have explicit permission to test.

Export results to JSON

pyprobe-scan 127.0.0.1 --json

The short form is also available (applicable to all commands use -h to view):

pyprobe-scan 127.0.0.1 -j

The scan results are saved to a timestamped JSON file in the current working directory.

Enable verbose logging:

pyprobe-scan 127.0.0.1 -v

Set a timeout on each TCP connection:

pyprobe-scan 127.0.0.1 -t 3 # Default is 3s

Scan specific ports on the server

pyprobe-scan 127.0.0.1 -p 80 443 # Scans port 80 and 443

Use SYN scanning

pyprobe-scan 127.0.0.1 -sS

Run directly from source

If you haven't installed the package yet, run it from the repository root:

PYTHONPATH=src python -m pyprobe 127.0.0.1

Using Pyprobe in Python

Pyprobe is also designed to be imported into your own Python projects.

import asyncio
from pyprobe.scanner import scan

async def main():
    results = await scan("127.0.0.1")
    print(results)

asyncio.run(main())

The scanner returns a pandas DataFrame containing discovered ports and their detected service information.

You can process the results using pandas:

results = asyncio.run(scan("127.0.0.1"))

print(results)
print(f"Open ports found: {len(results)}")

Testing

If you don't have a server to run test scans against, you may use the ESP32 sketch in `tests/Dummy_ESP32_Server' to host one on your ESP32.

Replace the hyphens with your WiFi network's SSID and password, and get it's local IP from your serial monitor.

const char* ssid = "-";
const char* password = "-";

You will get the following output:

the tiny hair is from my dog Maple, who is snuggled up beside me as I write this

Credits

Shipped to Hack Club Crescent 2026

made with 💗 from fourtysevencode

Metadata

Release files for pyprobe-scan 0.1.70

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyprobe-scan 0.1.70
File Size Uploaded Provenance
pyprobe_scan-0.1.70.tar.gz 13.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyprobe-scan 0.1.70
File Interpreter ABI Platform
pyprobe_scan-0.1.70-py3-none-any.whl Python 3 none any Details

Total release size: 27.4 kB

Release files / pyprobe_scan-0.1.70.tar.gz

Download URL pyprobe_scan-0.1.70.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cf63f6c6476794b7195787897f1b31a9ed018dec67e271bc3f0ee716945bdfeb
BLAKE2b-256 checksum
How to use checksums
863243d6d58b174b7d1becc228278df5f552a64b271e226ebfc045e887c357d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Release files / pyprobe_scan-0.1.70-py3-none-any.whl

Download URL pyprobe_scan-0.1.70-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21ed93a1ad8df683afb5881f4c5ec3488552b648b1a23e9388553e64fe88bd0b
BLAKE2b-256 checksum
How to use checksums
a64d5cc797dec075ce40ebe9e37dfdbdf39615d1dc8c22de42afc291a633be4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for pyprobe-scan 0.1.70

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page