Skip to main content

Network reconnaissance toolkit — port scanning, service detection, OS fingerprinting, and more. Pure Python API over nmap.

Project description

netrecon

Network reconnaissance toolkit — port scanning, service detection, OS fingerprinting, and vulnerability scanning. Async Python API wrapping nmap.

Install

pip install netrecon

Requires nmap installed on your system.

Quick Start

import asyncio
from netrecon import NetRecon

async def main():
    recon = NetRecon()
    result = await recon.quick_scan("192.168.1.1")
    print(result.summary())

asyncio.run(main())

Scan Types

recon = NetRecon()

# Quick scan — top 1000 ports
result = await recon.quick_scan("10.0.0.1")

# Full scan — all 65535 ports
result = await recon.full_scan("10.0.0.1")

# Vulnerability scan
result = await recon.vuln_scan("10.0.0.1")

# Stealth SYN scan
result = await recon.stealth_scan("10.0.0.1")

# UDP scan
result = await recon.udp_scan("10.0.0.1")

# Custom scan
result = await recon.scan("10.0.0.1", ports="80,443,8080", flags="-sV -O")

Working with Results

from netrecon import NetRecon

async def analyze():
    recon = NetRecon()
    result = await recon.scan("192.168.1.0/24")

    for host in result.hosts:
        print(f"{host.address}{host.os_guess}")
        for port in host.open_ports:
            print(f"  {port.number}/{port.protocol} {port.service_name} {port.service_version}")

    # Summary
    print(result.summary())

    # Filter
    web_hosts = [h for h in result.hosts
                 if any(p.service_name in ('http', 'https') for p in h.open_ports)]

asyncio.run(analyze())

Custom Scanner

from netrecon import PortScanner

scanner = PortScanner()
result = scanner.scan_sync("10.0.0.1", ports="22,80,443")

CTF Mode

Built-in helpers for capture-the-flag competitions:

from netrecon import NetRecon

async def ctf_recon(target):
    recon = NetRecon()

    # Find all open services
    result = await recon.scan(target, ports="1-65535", flags="-sV -sC -O")

    # Look for interesting services
    for host in result.hosts:
        for port in host.open_ports:
            if port.service_version:
                print(f"[!] {port} — possible exploit target")

asyncio.run(ctf_recon("10.10.x.x"))

Requirements

  • Python 3.10+
  • nmap installed on your system (sudo apt install nmap)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_netrecon-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_netrecon-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file py_netrecon-0.1.0.tar.gz.

File metadata

  • Download URL: py_netrecon-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for py_netrecon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7cfa777a93ab288a43c5d5c498cf0690810e71c5aab96ceb293a4c995b2f7481
MD5 9846cee200c94edd6e54b65c1e9d5310
BLAKE2b-256 36eec533fbfd09ec6e4bdf3257fd9ee3df3003ad9407fdf2001ced166867ba91

See more details on using hashes here.

File details

Details for the file py_netrecon-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: py_netrecon-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for py_netrecon-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7f3cdc3034161c8a18071fcc2665693a28d22fc04fde06eafe632d63c81bb9a
MD5 176658bccc51442664ad88d17e41b4a9
BLAKE2b-256 eba19b7234338c304dac1cb1ea948c5ac13d638d557b7f22e7b9fc738da49ab8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page