Skip to main content

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

Project description

how to..

… install:

pip3 install pyoui
# master branch should be stable as well
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__)

ae = list(entries.by_country_name("United States"))
print("by country code length:", len(e), " | by name length:", len(ae))
print("lengths should be equal")

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.52.tar.gz (3.7 kB view details)

Uploaded Source

Built Distributions

pyoui-0.52-py3.8.egg (4.0 kB view details)

Uploaded Source

pyoui-0.52-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyoui-0.52.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for pyoui-0.52.tar.gz
Algorithm Hash digest
SHA256 25f4a02fadb1b61203eebf59277aaa57a2e2b7f91c818d33180444d3a3d6cf74
MD5 e74094e8a7ffd793111da2cfa6699264
BLAKE2b-256 76e90cb16785f7a8ade8309e4f6df7ae47719753b140ae4ab4131b080aa2ce67

See more details on using hashes here.

File details

Details for the file pyoui-0.52-py3.8.egg.

File metadata

  • Download URL: pyoui-0.52-py3.8.egg
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for pyoui-0.52-py3.8.egg
Algorithm Hash digest
SHA256 58c29dd3f47cf27b294af582f59f7b2f9e03890dda0a1a5c08c0a08e5f7abfea
MD5 5d18793c0ab450ab6839fb9892757a92
BLAKE2b-256 18c128217b56706a70e0c8348b4804887f8929acf023470bd1133f91fce04b5c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyoui-0.52-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for pyoui-0.52-py3-none-any.whl
Algorithm Hash digest
SHA256 35a97add6b25f75fe6db9cd8266f89dfe0aea8388f01ae6925507d8f1047c397
MD5 665615ee8153593399be5cbe31debc87
BLAKE2b-256 876476a2eb3e6a13e3bd60a34f83b88df77b3d0f4514ab00fcb110db4e6c95ac

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