Files
AS_Network_List/README.md
2024-03-01 11:03:43 +01:00

2.2 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 and Linux.

Prerequisites

Installation

  1. Clone this repository:

    git clone https://github.com/C24Be/AS_Network_List.git
    
  2. Navigate to the repository folder:

    cd AS_Network_List
    
  3. Install the required Python packages:

    ./requirements.sh
    

Usage

network_list_from_as.py

  1. Run the script with the AS number as an argument:

    ./network_list_from_as.py AS61280
    
  2. To suppress all output except the prefixes, use the --quiet or -q switch:

    ./network_list_from_as.py AS61280 -q
    
  3. To display a help message, use the -h or --help switch:

    ./network_list_from_as.py --help
    

network_list_from_netname.py

  1. Run the script with a file containing a list of network names as an argument:

    ./network_list_from_netname.py files/blacklist4.txt
    
  2. 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.txt
    

    Or better use the raw file link:

    ./network_list_from_netname.py https://raw.githubusercontent.com/AntiZapret/antizapret/master/blacklist4.txt
    
  3. To display a help message, use the -h or --help switch:

    ./network_list_from_netname.py --help
    

Screenshots

image image