Skip to main content

Find the vendor for a given MAC address

Project description

Mac Vendor Lookup

This library provides an easy way to get vendor information from a MAC address. It contains a local copy of the IEEE's OUI prefix list. It has an asynchronous interface using Python 3's asyncio as well as a regular synchronous interface for old-school usage.

Installation

pip install mac-vendor-lookup

Basic Usage

from mac_vendor_lookup import MacLookup

print(MacLookup().lookup("00:80:41:12:FE"))

Output:

VEB KOMBINAT ROBOTRON

Update the vendor list

The library contains a list of MAC prefixes obtained at build-time. If you need up-to-date information, you can download 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.update_vendors()  # <- This can take a few seconds for the download

def find_mac(mac_address):
    print(mac.lookup(mac_address))

Async Interface

There is also an asynchronous interface available:

from mac_vendor_lookup import AsyncMacLookup

async def main():
    mac = AsyncMacLookup()
    print(await mac.lookup("98:ED:5C:FF:EE:01"))

Output:

Tesla Motors, Inc

Command line interface

This library provides a rudimentary command line interface:

$ mac_vendor_lookup 50-D3-7F-00-01-00
Yu Fly Mikly Way Science and Technology Co., Ltd.
$ python3 -m mac_vendor_lookup 00:26:12:12:FE
Space Exploration Technologies

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mac_vendor_lookup-0.1.10-py3-none-any.whl (315.1 kB view details)

Uploaded Python 3

File details

Details for the file mac_vendor_lookup-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: mac_vendor_lookup-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 315.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7

File hashes

Hashes for mac_vendor_lookup-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d6b06ff122a1cd9afb015164329ecf86aea841733ff527660196a800478522b4
MD5 807867d1a6a51975b746141f2c00b0cb
BLAKE2b-256 3e40168abd6d62d07a3597712526db30e4498024da90116f0132eea57633d48c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page