How To Install python3-pyasn on Kali Linux
Introduction
In this tutorial we learn how to install python3-pyasn
on Kali Linux.
What is python3-pyasn
python3-pyasn is:
pyasn is a Python extension module that enables very fast IP address to Autonomous System Number lookups. Current state and Historical lookups can be done, based on the MRT/RIB BGP archive used as input.
pyasn is different from other ASN lookup tools in that it provides offline and historical lookups. It provides utility scripts for users to build their own lookup databases based on any MRT/RIB archive. This makes pyasn much faster than online dig/whois/json lookups.
The module is written in C and Python, and cross-compiles on Linux and Windows. Underneath, it uses a radix tree data structure for storage of IP addresses. In the current version, it borrows code from py-radix to support both IPV4 and IPV6 network prefixes. The current release is a beta. Compared to the previous version, it provides support for Python 2 and 3; adds new functionality, performance improvements, and unit-tests.
pyasn is developed and maintained by researchers at the Economics of Cybersecurity research group at Delft University of Technology (http://econsec.tbm.tudlft.nl). The package is used on an almost daily basis and bugs are fixed pretty quickly. The package is largely developed and maintained by Hadi Asghari and Arman Noroozian. Please report any bugs via GitHub (https://github.com/hadiasghari/pyasn) or email the developers.
There are three methods to install python3-pyasn
on Kali Linux. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install python3-pyasn Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install python3-pyasn
using apt-get
by running the following command:
sudo apt-get -y install python3-pyasn
Install python3-pyasn Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install python3-pyasn
using apt
by running the following command:
sudo apt -y install python3-pyasn
Install python3-pyasn Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install python3-pyasn
using aptitude
by running the following command:
sudo aptitude -y install python3-pyasn
How To Uninstall python3-pyasn on Kali Linux
To uninstall only the python3-pyasn
package we can use the following command:
sudo apt-get remove python3-pyasn
Uninstall python3-pyasn And Its Dependencies
To uninstall python3-pyasn
and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove python3-pyasn
Remove python3-pyasn Configurations and Data
To remove python3-pyasn
configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge python3-pyasn
Remove python3-pyasn configuration, data, and all of its dependencies
We can use the following command to remove python3-pyasn
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge python3-pyasn
Dependencies
python3-pyasn have the following dependencies:
References
Summary
In this tutorial we learn how to install python3-pyasn
package on Kali Linux using different package management tools: apt
, apt-get
and aptitude
.