Skip to content

A simple python script that downloads and optionally sorts the list of AS numbers of the provided country code from ipinfo website

Notifications You must be signed in to change notification settings

kandootech/fetch-asn-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

ASN List for a Country

This Python script fetches the list of ASNs for a given country from ipinfo.io.

Requirements

make sure you have the required pachages by running

pip install -r requirements.txt

Usage

python fetch-asn-list.py [OPTIONS] COUNTRY_CODE

Required Arguments

  • COUNTRY_CODE: The 2-letter code for the country whose ASN list you want to generate.

Optional Arguments

  • -r, --raw: Export the raw HTML data to a file instead of parsing it.

  • -t, --table: Export the ASN list to a text file in a table format.

  • -s, --sort`: sort table by number of IPs.

  • e, --export: export table to file in plain text.

Example Usage

python fetch-asn-list.py ir

About

A simple python script that downloads and optionally sorts the list of AS numbers of the provided country code from ipinfo website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages