getas
is a convenient tool for analyzing Autonomous Systems
(AS) information, routes, and network aggregation
. The script supports working with IP addresses, networks, domain names, or AS numbers. Its key features include retrieving detailed AS
information, aggregating networks, and formatted output in both English
and Russian
.
This tool is designed for network engineers, analysts, and anyone interested in Internet route analysis.
With many websites being blocked, up-to-date information about networks associated with various organizations has become particularly valuable. For example, to get a full list of networks associated with YouTube (Google), you only need to run:
getas youtube.com -r
git clone https://github.com/mnbarinov/getas.git
cd getas
chmod +x $(pwd)/getas.py
To make the script easier to use, create a symbolic link:
sudo ln -s $(pwd)/getas.py /usr/local/bin/getas
Now you can run the script using the command getas
.
The script requires Python 3 and the whois command. Install them if they are not already available:
sudo apt update
sudo apt install python3 python3-pip whois
sudo dnf install python3 python3-pip whois
By default, the script outputs information in English. To set Russian as the default language, add the following alias to your .bashrc
file:
echo "alias getas='getas --lang ru'" >> ~/.bashrc source ~/.bashrc
getas 15169
getas 15169 --tolerance 8
getas 15169 --no-merge
getas 8.8.8.8
getas 8.8.8.8 -r
getas 8.8.8.8 -m -r
getas example.com
getas mbarinov.ru -r --lang {ru,en}
getas --help
getas help
To run the getas.py
script on Windows, you need to set up Python and follow a few steps:
- Download Python from the official website.
- Install
Python
, ensuring that theAdd Python to PATH
option is selected during installation. - Verify the installation by running the following command in the Command Prompt:
python --version
Step 2. Download and Install Whois
Download the getas.py
script and save it in a convenient location, such as C:\getas\
.
cd C:\getas
python getas.py youtube.com -r
The script will return a list of networks associated with the specified domain (e.g., YouTube or Google). These results can be used for analysis or routing configuration.
To simplify execution, you can create a shortcut or a batch file (.bat) with the following content:
@echo off
python C:\getas\getas.py %*
Save the file as getas.bat
, and you can run it directly from the Command Prompt:
getas youtube.com -r
Now you can conveniently use getas
on Windows.
Mikhail Barinov
-
GitHub: https://github.com/mnbarinov
-
Website: https://mbarinov.ru