Skip to main content

ipranger Logo

made-with-python PyPI GitHub

A python package and commandline tool for generating IPv4-addresses based on a nmap-like format.

Setup

ipranger can be installed either by using pip or by pulling the source code from this repository:

# Install using pip
pip3 install ipranger

Overview

This section provides an overview of the individual ways to interact with ipranger.

Command Line

ipranger can be directly used via the commandline and as such included in bash-scripts for advanced IPv4 address format processing.

# Print IPv4 subnet
$ ipranger 192.0.0.1/29
192.0.2.1
192.0.2.2
...
192.0.2.6

# Ranges, comma separated values and IPv4 addresses
$ ipranger 192.168.2.1,2,192.168.2.3,4,5-6
192.0.2.1
192.0.2.2
...
192.0.2.6

# Exclude IPv4 addresses
$ ipranger 192.168.2.1-6 --exclude 192.168.2.2
192.0.2.1
192.0.2.3
...
192.0.2.6

Package

ipranger can be used via the custom argparse type ip_addresses_type:

import argparse
from ipranger import ip_addresses_type
parser = argparse.ArgumentParser(description='Scan IPv4 addresses')
parser.add_argument('ip_addresses', type=ip_addresses_type,
                    help="List of IPv4 addresses e.g. '192.168.0.1' '192.168.0.1,3-20', '192.168.0.1/24'")
arguments = parser.parse_args()
for ip_address in arguments.ip_addresses:
    print(ip_address)

Another way to interact with ipranger in python programs is by importing the generate method:

from ipranger import generate
for ip_address in generate(include_list=['192.168.0.1-6'], exclude_list=['192.168.0.2']):
    print(ip_address)

Metadata

Release files for ipranger 1.1.2

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

Source distribution (sdist)

Source distribution for ipranger 1.1.2
File Size Uploaded Provenance Actions
ipranger-1.1.2.tar.gz 18.1 kB Without provenance Details for ipranger-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ipranger 1.1.2
File Interpreter ABI Platform Actions
ipranger-1.1.2-py3-none-any.whl Python 3 none any Details for ipranger-1.1.2-py3-none-any.whl

Total release size: 37.5 kB

Release files / ipranger-1.1.2.tar.gz

Download URL ipranger-1.1.2.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
04db50455520765421d0892dbe7622d9bf0b79c9f3153ad5e0540811cd8312d9
BLAKE2b-256 checksum
How to use checksums
ec5c87204d85273dad2587ed907b0ec6cdd3c92c51ea2a2c57f13c58e7e885d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0

Release files / ipranger-1.1.2-py3-none-any.whl

Download URL ipranger-1.1.2-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c04b8c33b3eaabc381df8e6b6891c6077658e43b9d801c832847627f0b4d731a
BLAKE2b-256 checksum
How to use checksums
49f2b7c27612e63dd2abd074f523da08e52c4449ba1ef80fa313c504c30d00ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0

Security for ipranger 1.1.2

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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