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__)

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

Uploaded Source

Built Distributions

pyoui-0.44-py3.8.egg (3.7 kB view details)

Uploaded Source

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyoui-0.44.tar.gz
  • Upload date:
  • Size: 3.5 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.44.tar.gz
Algorithm Hash digest
SHA256 ff090c9a4a87a6564616317a5ceced4607c30629271ee835a20867f34a89aec1
MD5 4249e37ddc3c2716d82ff9f48591c91d
BLAKE2b-256 86cc8252db362d4b646cf2989f8b6b4662ba24b4fed76d5bc289bedfacbcb182

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyoui-0.44-py3.8.egg
  • 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.44-py3.8.egg
Algorithm Hash digest
SHA256 f466b825b37bba971602e16237b288e406eb32a90298e833bc6eac8c98e2aa8f
MD5 01b5383175d61cff1a3f6f9f689bdee5
BLAKE2b-256 7096b11cae142e950f7a2e9c50e0df632ca691cdb8dbe8c13df2c26bb155c1df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyoui-0.44-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.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.44-py3-none-any.whl
Algorithm Hash digest
SHA256 c8125fcb741033edcbdfcf61cd9487618428ef8707b1ec40227a58b0d0589118
MD5 ec0510115daf6250fd44eaedf09e0318
BLAKE2b-256 3ee01cc25b8b04fd2b9e6f366758c06eb3c1388c3172beefe571149235ac676c

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