Python script to get device vendor name from MAC Address
Prerequisite: Python Requests
A MAC address is a unique identity of a network interface that is used to address the device in a Computer Network.
What does MAC Address consist of?
A MAC address is made up of 12 hexadecimal digits, 6 octets separated by ‘:’. There are 6 octets in a MAC address. In the first half, the manufacturer info is stored.
How do we get the Manufacturer details?
For this article, we will be using an API that will fetch the MAC Address for us. We will use a Python script to automate the fetching process so that we can use it later in the Softwares and websites that may require this functionality.
We will use requests module to work with this API.
Below is the implementation.
Save this code as macdetails.py. We can use ‘-h’ or ‘–help’ to see the help on how to run this script from the terminal.