Yu Fly Mikly Way Science and Technology Co., Ltd. There is no such problem on other machines. This library provides a rudimentary command line interface: $ mac_vendor_lookup 50-D3-7F-00-01-00 uuid.UUID(intuuid.getnode()).hex-12: ''' When I execute the code on the python command line, what I get is not the MAC address of eth0, but the MAC address of a docker network card. There is also an asynchronous interface available: from mac_vendor_lookup import AsyncMacLookup async def main (): mac = AsyncMacLookup () print ( await mac. update_vendors () # <- This can take a few seconds for the download and it will be stored in the new path def find_mac ( mac_address ): print ( mac. cache_path = "/relative/or/absolute/path/to/the/prefered/storage/location" mac = MacLookup () mac.
from mac_vendor_lookup import MacLookup, BaseMacLookup BaseMacLookup. Location of: os.path.expanduser('~/.cache/mac-vendors.txt') to your prefered location. If a customĭirectory is required, then override the class variable cache_path of class BaseMacLookup(.) from it default The library stores and looks for the list of MAC prefixes in a group predefined defaults paths. The BSSID (also called a mac (media access control) address) is an address which specifies the router’s network card. In this case, our router is on channel 1. lookup ( mac_address )) Vendor list custom location or path The BSSID (mac address) of the router The Channel of the router A wireless router broadcasts the WiFi signal on channels ranging from 1 to 11. update_vendors () # <- This can take a few seconds for the download def find_mac ( mac_address ): print ( mac. If you need up-to-date information, you canĭownload a fresh copy of the list directly from IEEE with MacLookup.update_vendors or AsyncMacLookup.update_vendors: from mac_vendor_lookup import MacLookup mac = MacLookup () mac.
The library contains a list of MAC prefixes obtained at build-time.
#PYTHON MAC ADDRESS F UPDATE#
VEB KOMBINAT ROBOTRON Update the vendor list
#PYTHON MAC ADDRESS F INSTALL#
Installation pip install mac-vendor-lookupīasic Usage from mac_vendor_lookup import MacLookup print ( MacLookup ().
It has an asynchronous interface using Python 3's asyncio as well as a regular synchronous interfaceįor old-school usage. This library provides an easy way to get vendor information from a MAC address.