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 .
Metadata
Release files for netenum 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| netenum-0.1.1.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| netenum-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.6 kB
Release files / netenum-0.1.1.tar.gz
| Download URL | netenum-0.1.1.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b9f68e993dcfb1812b1b100d06548039d15bf808941197d8d2ac2cafa1d7064
|
|
BLAKE2b-256 checksum How to use checksums |
9e5bcf8e4fd31eb8aba00afd8c926efa20b4df3bb7b8b23d40b4f3785ad3e1ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 8, 2025.
Transparency logRelease files / netenum-0.1.1-py3-none-any.whl
| Download URL | netenum-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efe378b64d72fd1cea59c7b01795dc0321a871d71f54fe8d38bd76a26d6a8566
|
|
BLAKE2b-256 checksum How to use checksums |
5a57aeecd4b836b4cee79a22532b318b4a42655b1ff677b7b39b7503bfb3a177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 8, 2025.
Transparency log