mirror of
https://github.com/C24Be/AS_Network_List.git
synced 2026-01-24 23:26:38 +03:00
2.4 KiB
2.4 KiB
AS Network List
This repository contains two Python scripts that allow you to retrieve network lists based on either an Autonomous System (AS) name or a Network name.
Features
network_list_from_as.py: Retrieves a list of networks associated with a given AS name.network_list_from_netname.py: Retrieves a list of networks associated with a given Network name.
These scripts have been tested on MacOS, FreeBSD and Linux.
Prerequisites
- Python 3: Download it from the official website.
Installation
-
Clone this repository:
git clone https://github.com/C24Be/AS_Network_List.git -
Navigate to the repository folder:
cd AS_Network_List -
Install the required Python packages:
./requirements.sh
Usage
network_list_from_as.py
-
Run the script with the AS number as an argument:
./network_list_from_as.py AS61280 -
To suppress all output except the prefixes, use the
--quietor-qswitch:./network_list_from_as.py AS61280 -q -
To display a help message, use the
-hor--helpswitch:./network_list_from_as.py --help
network_list_from_netname.py
-
Run the script with a file containing a list of network names as an argument:
./network_list_from_netname.py lists/run-gov-netnames.txt -
Run the script with a URL to a file in a GitHub repository as an argument:
./network_list_from_netname.py https://github.com/AntiZapret/antizapret/blob/master/blacklist4.txtOr better use the raw file link:
./network_list_from_netname.py https://raw.githubusercontent.com/AntiZapret/antizapret/master/blacklist4.txt -
To display a help message, use the
-hor--helpswitch:./network_list_from_netname.py --help
Screenshots
Contributing
Contributors are welcome!