Efficient IP address enumerator that interpolates across IPv4 and IPv6 CIDR ranges
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netenum-0.1.1.tar.gz.
File metadata
- Download URL: netenum-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b9f68e993dcfb1812b1b100d06548039d15bf808941197d8d2ac2cafa1d7064
|
|
| MD5 |
78ec82d0e82efb7b3ce10c66a8314f01
|
|
| BLAKE2b-256 |
9e5bcf8e4fd31eb8aba00afd8c926efa20b4df3bb7b8b23d40b4f3785ad3e1ee
|
Provenance
The following attestation bundles were made for netenum-0.1.1.tar.gz:
Publisher:
publish.yml on paigeadelethompson/python-netenum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netenum-0.1.1.tar.gz -
Subject digest:
2b9f68e993dcfb1812b1b100d06548039d15bf808941197d8d2ac2cafa1d7064 - Sigstore transparency entry: 179238224
- Sigstore integration time:
-
Permalink:
paigeadelethompson/python-netenum@900b48de8bfe578b25c619b36e11cea6a685ad0f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/paigeadelethompson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@900b48de8bfe578b25c619b36e11cea6a685ad0f -
Trigger Event:
push
-
Statement type:
File details
Details for the file netenum-0.1.1-py3-none-any.whl.
File metadata
- Download URL: netenum-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efe378b64d72fd1cea59c7b01795dc0321a871d71f54fe8d38bd76a26d6a8566
|
|
| MD5 |
e3d458fee80fdc8aa8dc5de06e10aa80
|
|
| BLAKE2b-256 |
5a57aeecd4b836b4cee79a22532b318b4a42655b1ff677b7b39b7503bfb3a177
|
Provenance
The following attestation bundles were made for netenum-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on paigeadelethompson/python-netenum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netenum-0.1.1-py3-none-any.whl -
Subject digest:
efe378b64d72fd1cea59c7b01795dc0321a871d71f54fe8d38bd76a26d6a8566 - Sigstore transparency entry: 179238225
- Sigstore integration time:
-
Permalink:
paigeadelethompson/python-netenum@900b48de8bfe578b25c619b36e11cea6a685ad0f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/paigeadelethompson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@900b48de8bfe578b25c619b36e11cea6a685ad0f -
Trigger Event:
push
-
Statement type: