Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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.
pip install mac-vendor-lookup
from mac_vendor_lookup import MacLookup
print(MacLookup().lookup("00:80:41:12:FE"))
Output:
VEB KOMBINAT ROBOTRON
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))
The library stores and looks for the list of MAC prefixes in a group predefined defaults paths. If a custom
directory is required, then override the class variable cache_path
of class BaseMacLookup(...)
from it default
location of: os.path.expanduser('~/.cache/mac-vendors.txt')
to your prefered location.
from mac_vendor_lookup import MacLookup, BaseMacLookup
BaseMacLookup.cache_path = "/relative/or/absolute/path/to/the/prefered/storage/location"
mac = MacLookup()
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.lookup(mac_address))
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
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
FAQs
Find the vendor for a given MAC address
We found that mac-vendor-lookup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.