ASLO
AS Lookup Helper Script. It’s written for OpenBSD and need’s some modification for Linux. It basically depends on Python, PIP Installer and Python Package “aslookup”. Have Fun !
Download
wget https://blog.stoege.net/scripts/aslo
chmod 755 aslo
./aslo 1.1.1.1
Script
… and the Content himelf. It basically check’s if pip is installed, if as-lookup is installed, and then does the as lookup for the given IP Adress
#!/usr/bin/env bash
# AS Lookup for IP Address
install_pip() {
echo -e "\npip not found, install ?\n"
read -rsp $'Press any key to continue...\n' -n1 key
pkg_add py3-pip--
ln -sf /usr/local/bin/pip3.9 /usr/local/bin/pip
echo -e "\npip installed ...\n"
}
install_aslookup() {
echo -e "\nas-lookup not found, install ?\n"
read -rsp $'Press any key to continue...\n' -n1 key
pip install aslookup
echo -e "\naslookup installed ...\n"
}
aslo() {
as-lookup -s cymru `getent hosts $1 |awk '!/:/{ print $1}'`
}
which pip &>/dev/null || install_pip
which as-lookup &>/dev/null || install_aslookup
aslo $1
exit 0
Usage
you can simply ask one ip …