Skip to main content

Efficient IP address enumerator that interpolates across IPv4 and IPv6 CIDR ranges

Reason this release was yanked:

bad release parameter

Project description

Netenum

Efficient IP address enumerator that interpolates across IPv4 and IPv6 CIDR ranges without expanding full ranges in memory.

Features

  • Supports both IPv4 and IPv6 CIDR ranges
  • Memory efficient - doesn't expand full ranges
  • Intelligent partitioning based on network size
  • Stripes across multiple networks for balanced enumeration
  • Supports both synchronous and asynchronous iteration
  • Command-line interface with stdin input

Installation

pip install netenum

Usage

Command Line

Enumerate addresses in sequence:

echo "192.168.1.0/24
10.0.0.0/8" | python -m netenum

Enumerate addresses in random order:

echo "192.168.1.0/24
10.0.0.0/8" | python -m netenum -r

You can also use a file:

cat cidrs.txt | python -m netenum

Python API

Synchronous Usage

from netenum import netenum

cidrs = [
    "192.168.0.0/16",          # IPv4
    "2001:db8::/32",           # IPv6
    "224.0.0.0/4",             # IPv4
]

for addr in netenum(cidrs):
    print(addr)

Asynchronous Usage

import asyncio
from netenum import aionetenum

cidrs = [
    "192.168.0.0/16",          # IPv4
    "2001:db8::/32",           # IPv6
    "224.0.0.0/4",             # IPv4
]

async def main():
    async for addr in await aionetenum(cidrs):
        print(addr)

asyncio.run(main())

Development

Install development dependencies:

pip install -e ".[dev]"

Run tests:

pytest

Format code:

black .
isort .

Type check:

mypy .

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

netenum-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

netenum-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netenum-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for netenum-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7d64806d28f8c1c3afb3854c15a5318785f004a46f7fa9499017f45326768596
MD5 7c209c940d8fd1730536c4232ac6f63e
BLAKE2b-256 cc764025951d3b42fbbe3fa6227c656277c7d2af9eb80ba0d49d50566302d58c

See more details on using hashes here.

Provenance

The following attestation bundles were made for netenum-0.1.0.tar.gz:

Publisher: publish.yml on paigeadelethompson/python-netenum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: netenum-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for netenum-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67103cafeb24fc3a686790bf4a8ec07fc8376b15069f53ebe869c81ea64c2e81
MD5 546715459183cbe9bd58eb509d518a50
BLAKE2b-256 c5762761faa649b8d7d9612595aad42093e586a07d1bc98b72a02a70527ac364

See more details on using hashes here.

Provenance

The following attestation bundles were made for netenum-0.1.0-py3-none-any.whl:

Publisher: publish.yml on paigeadelethompson/python-netenum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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