Skip to main content

lookup the ieee's oui table by mac, mac prefix, org name or country

Project description

pyoui

how to..

... install:

pip3 install git+https://github.com/smthnspcl/pyoui

... use by cli:

pyoui --help

usage: pyoui [-h] [-o OUTFILE] [-d] [-p PREFIX] [-c COMPANY]

optional arguments:
  -h, --help            show this help message and exit
  -o OUTFILE, --outfile OUTFILE
                        oui file which will be downloaded and read.
  -d, --debug           enable debugging
  -p PREFIX, --prefix PREFIX
                        search by mac prefix
  -c COMPANY, --company COMPANY
                        search by company name

... use by code:

from pyoui import OUI

entries = OUI(debug=True).parse()

print("entries:", entries.size())

e = next(entries.by_company("national security"))
print("company", e.company.__dict__, e.prefix)

e = next(entries.by_prefix("00:22:72"))
print("prefix", e.company.__dict__, e.prefix)

e = next(entries.by_mac("BC:23:92:42:42:42"))
print("mac", e.company.__dict__, e.prefix)

e = list(entries.by_country_code("US"))
print("length:", len(e))
print("first item:", e[0].prefix, e[0].company.__dict__)

other info:

the csv folder was generated by obsolete/dump.py
the folder obsolete is as the name implies, obsolete.
all files in there are py2 and won't be refactored.

the setup.py will only install the pyoui package.

Project details


Download files

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

Source Distribution

pyoui-0.42.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

pyoui-0.42-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file pyoui-0.42.tar.gz.

File metadata

  • Download URL: pyoui-0.42.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3rc1

File hashes

Hashes for pyoui-0.42.tar.gz
Algorithm Hash digest
SHA256 52202988f257131a372f0d07aa404d2fceacc3e6ec9596edb7854a963333fe12
MD5 b945bda502cbf615244f0cc50c3358e3
BLAKE2b-256 32e12cc8318db0211330d08434c9612ada389bd399b43015e2a0303ba7331928

See more details on using hashes here.

File details

Details for the file pyoui-0.42-py3-none-any.whl.

File metadata

  • Download URL: pyoui-0.42-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3rc1

File hashes

Hashes for pyoui-0.42-py3-none-any.whl
Algorithm Hash digest
SHA256 638a9938000b608ca0758321ae159a742e673b90bbc823d523d691b1e55b40ca
MD5 f0f82c1d81e56872e47f8392569e57de
BLAKE2b-256 913bfed086990cc8a11f5bf2bb899d55646814bd437b9cf6f70820cae3a25d0d

See more details on using hashes here.

Supported by

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