Skip to content

This project provides a Python script to process IP ranges from various Regional Internet Registries (RIRs). It allows you to fetch and display IP Prefixes (IPv4, IPv6) and, optionally, organization information associated with these IP ranges. The script supports multiple RIRs, including RIPE NCC, AFRINIC, APNIC, LACNIC, and ARIN.

License

Notifications You must be signed in to change notification settings

miladafshari/RIR-IP-Info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RIR IP Info

Python Version GitHub issues GitHub forks GitHub stars

A network information extractor from RIR

This project provides a Python script to process IP ranges from various Regional Internet Registries (RIRs). It allows you to fetch and display IP Prefixes (IPv4, IPv6) and, optionally, organization information associated with these IP ranges. The script supports multiple RIRs, including RIPE NCC, AFRINIC, APNIC, LACNIC, and ARIN. This project is useful for network administrators, researchers, and IT professionals who need to analyze and manage IP address allocations across different regions.

Installation

GitHub

To get started with the project, follow these steps:

git clone https://github.com/miladafshari/RIR-IP-Info.git
cd RIR-IP-Info
sudo make depends
make install

Usage

Run the Script: Execute the Python script from the command line:

rir-ip-info -h

Example

This command retrieves the allocated IPv4 and IPv6 prefixes for Iran (IR) and Oman (OM) from the RIPE NCC database, displaying their network names and status.

rir-ip-info -r ripe -c ir om -t allocated -v 4 6 -o netname status

Help

The script will accept the following arguments:

-r/--rir: Enter the Regional Internet Registry (e.g., RIPE, AFRINIC, APNIC, LACNIC, ARIN).

-c/--country_code Enter the country code (e.g., IR for Iran).

-t/--prefix_type Enter the type of prefix (Allocated/Assigned).

-v/--ip_version Enter the IP version (4/6).

-o/--org_info Choose whether to fetch organization information (e.g., netname, status).

-p/--progress Choose whether to display progress bar while fetching information.

Note: You can pass mutiple values to -r, -c, -t, -v and -o.

Output Files

The results will be saved to a file named according to the format:

results_{timestamp}.txt

Contributions

Any PR(s) are welcomed.

About

This project provides a Python script to process IP ranges from various Regional Internet Registries (RIRs). It allows you to fetch and display IP Prefixes (IPv4, IPv6) and, optionally, organization information associated with these IP ranges. The script supports multiple RIRs, including RIPE NCC, AFRINIC, APNIC, LACNIC, and ARIN.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published