The CIDR and Organization Finder is a powerful Python script designed to retrieve CIDR (Classless Inter-Domain Routing) blocks and associated organization information for given IP addresses. It utilizes multiple WHOIS data sources to provide comprehensive and accurate results.
- Retrieves CIDR blocks and organization names for IP addresses
- Uses multiple WHOIS data sources: CYMRU, ARIN, and IPWhois
- Implements a retry mechanism for resilience against temporary failures
- Provides asynchronous processing for improved performance
- Supports rate limiting to avoid overloading WHOIS servers
- Offers options for searching specific organizations and outputting raw data
- Groups and sorts results by organization and CIDR
- Python 3.7 or higher
- pip (Python package installer)
-
Clone this repository or download the
netscan.py
script. -
Install the required Python packages:
pip install aiohttp ipwhois
-
Make the script executable:
chmod +x netscan.py
The script reads IP addresses from standard input (stdin) and outputs the results to standard output (stdout). You can pipe the output of other tools into this script.
cat ip_list.txt | python3 netscan.py
or
subfinder -silent -d example.com | dnsx -silent -a -resp-only | python3 netscan.py
--search
: Search for a specific organization name (case-insensitive partial match)--raw
: Output raw JSON data instead of formatted results
-
Basic usage:
echo "8.8.8.8" | python3 netscan.py
-
Search for a specific organization:
cat ip_list.txt | python3 netscan.py --search "Google"
-
Output raw JSON data:
cat ip_list.txt | python3 ipinfo2.py --raw
-
Combine with other tools:
subfinder -silent -d example.com | dnsx -silent -a -resp-only | python3 netscan.py
The default output format is:
CIDR_BLOCK (Organization Name)
For example:
8.8.8.0/24 (Google LLC)
When using the --raw
option, the output will be in JSON format, containing detailed information about each IP address.
- The script relies on external WHOIS services, which may have rate limits or occasional downtime.
- Results may vary depending on the accuracy and completeness of WHOIS data sources.
- Large numbers of IP addresses may take significant time to process due to rate limiting and API restrictions.
Contributions, issues, and feature requests are welcome. Feel free to check issues page if you want to contribute.
[Specify your license here, e.g., MIT, Apache 2.0, etc.]
This tool is for educational and research purposes only. Ensure you comply with all applicable laws and regulations when using this script.