{"id":17485646,"url":"https://github.com/ghostofgoes/getmac","last_synced_at":"2025-08-30T02:04:47.983Z","repository":{"id":45486541,"uuid":"108493455","full_name":"GhostofGoes/getmac","owner":"GhostofGoes","description":"Platform-independent pure-Python module to get a MAC address","archived":false,"fork":false,"pushed_at":"2025-07-16T01:00:04.000Z","size":1332,"stargazers_count":90,"open_issues_count":25,"forks_count":27,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-20T00:23:58.195Z","etag":null,"topics":["get-mac","getmac","ipv4","layer2","linux","mac-address","network","networking","posix","python","python3","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GhostofGoes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-27T03:11:02.000Z","updated_at":"2025-05-05T22:09:29.000Z","dependencies_parsed_at":"2023-11-16T04:27:35.905Z","dependency_job_id":"154116ad-a769-44c9-9664-cca0ecc14708","html_url":"https://github.com/GhostofGoes/getmac","commit_stats":{"total_commits":630,"total_committers":17,"mean_commits":37.05882352941177,"dds":"0.19206349206349205","last_synced_commit":"68c148281a2d4b4fa7d70d6d447b2a8932b1dbee"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/GhostofGoes/getmac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GhostofGoes%2Fgetmac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GhostofGoes%2Fgetmac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GhostofGoes%2Fgetmac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GhostofGoes%2Fgetmac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GhostofGoes","download_url":"https://codeload.github.com/GhostofGoes/getmac/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GhostofGoes%2Fgetmac/sbom","scorecard":{"id":56195,"data":{"date":"2025-08-11","repo":{"name":"github.com/GhostofGoes/getmac","commit":"68c148281a2d4b4fa7d70d6d447b2a8932b1dbee"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 2/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":2,"reason":"badge detected: InProgress","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:93: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:103: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/GhostofGoes/getmac/codeql-analysis.yml/main?enable=pin","Warn: containerImage not pinned by hash: packaging/Dockerfile:1: pin your Docker image by updating python:3 to python:3@sha256:68d0775234842868248bfe185eece56e725d3cb195f511a21233d0f564dee501","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:82","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.9.5 not signed: https://api.github.com/repos/GhostofGoes/getmac/releases/165552148","Warn: release artifact 0.9.4 not signed: https://api.github.com/repos/GhostofGoes/getmac/releases/105629213","Warn: release artifact 0.9.3 not signed: https://api.github.com/repos/GhostofGoes/getmac/releases/95894031","Warn: release artifact 0.9.2 not signed: https://api.github.com/repos/GhostofGoes/getmac/releases/91336110","Warn: release artifact 0.9.1 not signed: https://api.github.com/repos/GhostofGoes/getmac/releases/90108091","Warn: release artifact 0.9.5 does not have provenance: https://api.github.com/repos/GhostofGoes/getmac/releases/165552148","Warn: release artifact 0.9.4 does not have provenance: https://api.github.com/repos/GhostofGoes/getmac/releases/105629213","Warn: release artifact 0.9.3 does not have provenance: https://api.github.com/repos/GhostofGoes/getmac/releases/95894031","Warn: release artifact 0.9.2 does not have provenance: https://api.github.com/repos/GhostofGoes/getmac/releases/91336110","Warn: release artifact 0.9.1 does not have provenance: https://api.github.com/repos/GhostofGoes/getmac/releases/90108091"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T00:48:51.803Z","repository_id":45486541,"created_at":"2025-08-15T00:48:51.803Z","updated_at":"2025-08-15T00:48:51.803Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272793018,"owners_count":24993830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["get-mac","getmac","ipv4","layer2","linux","mac-address","network","networking","posix","python","python3","windows"],"created_at":"2024-10-19T02:08:23.475Z","updated_at":"2025-08-30T02:04:47.958Z","avatar_url":"https://github.com/GhostofGoes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![Latest version on PyPI](https://badge.fury.io/py/getmac.svg)](https://pypi.org/project/getmac/)\n[![Coverage Status](https://coveralls.io/repos/github/GhostofGoes/getmac/badge.svg?branch=main)](https://coveralls.io/github/GhostofGoes/getmac?branch=main)\n[![GitHub Actions Pipeline Status](https://github.com/ghostofgoes/getmac/actions/workflows/ci.yml/badge.svg)](https://github.com/GhostofGoes/getmac/actions)\n[![Weekly PyPI downloads](https://pepy.tech/badge/getmac/week)](https://pepy.tech/project/getmac)\n[![PyPI downloads](https://pepy.tech/badge/getmac)](https://pepy.tech/project/getmac)\n[![PyPI downloadss of the old name](https://pepy.tech/badge/get-mac)](https://pepy.tech/project/get-mac)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nPure-Python package to get the MAC address of network interfaces and hosts on the local network.\n\nIt provides a platform-independent interface to get the MAC addresses of:\n\n- System network interfaces (by interface name)\n- Remote hosts on the local network (by IPv4/IPv6 address or hostname)\n\nIt provides one function: `get_mac_address()`\n\n[![asciicast](https://asciinema.org/a/rk6dUACUcZY18taCuIBE5Ssus.png)](https://asciinema.org/a/rk6dUACUcZY18taCuIBE5Ssus)\n\n[![asciicast](https://asciinema.org/a/n3insrxfyECch6wxtJEl3LHfv.png)](https://asciinema.org/a/n3insrxfyECch6wxtJEl3LHfv)\n\n\n## Should you use this package?\nIf you only need the addresses of network interfaces, have a limited set of platforms to support, and are able to handle C-extension modules, then you should instead check out the excellent [netifaces](https://pypi.org/project/netifaces/) package by Alastair Houghton ([@al45tair](https://github.com/al45tair)). It's significantly faster (thanks to it being C-code) and has been around a long time and seen widespread usage. However, unfortunately it is no longer maintained as of [May 2021](https://github.com/al45tair/netifaces/commit/ec55b59e27542776f55e0f9e3213a75bf8e0f367), so it may not be a great choice for new projects. Another great option that fits these requirements is the well-known and battle-hardened [psutil](https://github.com/giampaolo/psutil) package by Giampaolo Rodola.\n\nIf the only system you need to run on is Linux, you can run as root, and C-extensions modules are fine, then you should instead check out the [arpreq](https://pypi.org/project/arpreq/) package by Sebastian Schrader. In some cases it can be significantly faster.\n\nIf you want to use `psutil`, `scapy`, or `netifaces`, I have examples of how to do so in a [GitHub Gist](https://gist.github.com/GhostofGoes/0a8e82930e75afcefbd879a825ba4c26).\n\n## Installation\nStable release from PyPI\n\n```bash\npip install getmac\n```\n\nLatest development version\n\n```bash\npip install https://github.com/ghostofgoes/getmac/archive/main.tar.gz\n```\n\n## Python examples\n```python\nfrom getmac import get_mac_address\neth_mac = get_mac_address(interface=\"eth0\")\nwin_mac = get_mac_address(interface=\"Ethernet 3\")\nip_mac = get_mac_address(ip=\"192.168.0.1\")\nip6_mac = get_mac_address(ip6=\"::1\")\nhost_mac = get_mac_address(hostname=\"localhost\")\nupdated_mac = get_mac_address(ip=\"10.0.0.1\", network_request=True)\n\n# Enable debugging\nfrom getmac import getmac\ngetmac.DEBUG = 2  # DEBUG level 2\nprint(getmac.get_mac_address(interface=\"Ethernet 3\"))\n\n# Change the UDP port used for updating the ARP table (UDP packet)\nfrom getmac import getmac\ngetmac.PORT = 44444  # Default is 55555\nprint(getmac.get_mac_address(ip=\"192.168.0.1\", network_request=True))\n```\n\n## Terminal examples\n**Python 2 users**: use `getmac2` or `python -m getmac` instead of `getmac`.\n```bash\ngetmac --help\ngetmac --version\n\n# Invoking with no arguments will return MAC of the default interface\ngetmac\n\n# Usage as a module\npython3 -m getmac\n\n# Interface names, IPv4/IPv6 addresses, or Hostnames can be specified\ngetmac --interface ens33\ngetmac --ip 192.168.0.1\ngetmac --ip6 ::1\ngetmac --hostname home.router\n\n# Running as a Python module with shorthands for the arguments\npython -m getmac -i 'Ethernet 4'\npython -m getmac -4 192.168.0.1\npython -m getmac -6 ::1\npython -m getmac -n home.router\n\n# Getting the MAC address of a remote host requires the ARP table to be populated.\n# By default, getmac will populate the table by sending a UDP packet to a high port on the host (defaults to 55555).\n# This can be disabled with --no-network-request, as shown here:\ngetmac --no-network-request --ip 192.168.0.1\npython -m getmac --no-network-request -n home.router\n\n# Enable output messages\ngetmac --verbose\n\n# Debug levels can be specified with '-d'\ngetmac -v --debug\npython -m getmac -v -d -i enp11s4\npython -m getmac -v -dd -n home.router\n\n# Change the UDP port used for populating the ARP table when getting the MAC of a remote host\ngetmac --ip 192.168.0.1 --override-port 9001\n\n# The platform detected by getmac can be overridden via '--override-platform'.\n# This is useful when debugging issues or if you know a method\n# for a different platform works on the current platform.\n# Any values returned by platform.system() are valid.\ngetmac -i eth0 --override-platform linux\ngetmac --ip 192.168.0.1 --override-platform windows\n\n# Force a specific method to be used, regardless of the consequences or if it even works\ngetmac -v -dddd --ip 192.168.0.1 --force-method ctypeshost\n```\n\n## Function: get_mac_address()\n- `interface`: Name of a network interface on the system\n- `ip`: IPv4 address of a remote host\n- `ip6`: IPv6 address of a remote host\n- `hostname`: Hostname of a remote host\n- `network_request`: If an network request should be made to update and populate the ARP/NDP table of remote hosts used to lookup MACs in most circumstances. Disable this if you want to just use what's already in the table, or if you have requirements to prevent network traffic. The network request is a empty UDP packet sent to a high port, `55555` by default. This can be changed by setting `getmac.PORT` to the desired integer value. Additionally, on Windows, this will send a UDP packet to `1.1.1.1:53` to attempt to determine the default interface (Note: the IP is [CloudFlare's DNS server](https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/)).\n\n## Configuration\n- `logging.getLogger(\"getmac\")`: Runtime messages and errors are recorded to the `getmac` logger using Python's [logging](https://docs.python.org/3/library/logging.html) module. They can be configured by using [logging.basicConfig()](https://docs.python.org/3/library/logging.html#logging.basicConfig) or adding handlers to the `\"getmac\"` logger.\n- `getmac.getmac.DEBUG`: integer value that controls debugging output. The higher the value, the more output you get.\n- `getmac.getmac.PORT`: UDP port used to populate the ARP/NDP table (see the documentation of the `network_request` argument in `get_mac_address()` for details)\n- `getmac.getmac.OVERRIDE_PLATFORM`: Override the platform detection with the given value (e.g. `\"linux\"`, `\"windows\"`, `\"freebsd\"`, etc.'). Any values returned by `platform.system()` are valid.\n- `getmac.getmac.FORCE_METHOD`: Force a specific method to be used, e.g. 'IpNeighborShow'. This will be used regardless of it's method type or platform compatibility, and `Method.test()` will NOT be checked! The list of available methods is in `getmac.getmac.METHODS`.\n\n## Features\n- Pure-Python (no compiled C-extensions required!)\n- Python 2.7 and 3.4+\n- Lightweight, with no dependencies and a small package size\n- Can be dropped into a project as a standalone .py file\n- Supports most interpreters: CPython, pypy, pypy3, IronPython 2.7, and Jython 2.7\n- Provides a simple command line tool (when installed as a package)\n- MIT licensed!\n\n## Legacy Python versions\nIf you are running a old Python (2.6/3.3 and older) or interpreter, then you can install an older version of `getmac` that supported that version. The wheels are available in the [GitHub releases](https://github.com/GhostofGoes/getmac/releases), or from PyPI with a current version of `pip` and some special arguments.\n\n- Python 2.5: get-mac 0.5.0\n- Python 2.6: getmac 0.6.0\n- Python 3.2: get-mac 0.3.0\n- Python 3.3: get-mac 0.3.0\n\nNOTE: these versions do not have many of the performance improvements, platform support, and bug fixes that came with later releases. They generally work, just not as well. However, if you're using such an old Python, you probably don't care about all that :)\n\n## Notes\n- Python 3.10 and 3.11 should work, but are not automatically tested at the moment due to having to support 2.7\n- If none of the arguments are selected, the default network interface for the system will be used. If the default network interface cannot be determined, then it will attempt to fallback to typical defaults for the platform (`Ethernet` on Windows, `em0` on BSD, `en0` on OSX/Darwin, and `eth0` otherwise). If that fails, then it will fallback to `lo` on POSIX systems.\n- \"Remote hosts\" refer to hosts in your local layer 2 network, also commonly referred to as a \"broadcast domain\", \"LAN\", or \"VLAN\". As far as I know, there is not a reliable method to get a MAC address for a remote host external to the LAN. If you know any methods otherwise, please [open a GitHub issue](https://github.com/GhostofGoes/getmac/issues) or shoot me an email, I'd love to be wrong about this.\n- The first four arguments are mutually exclusive. `network_request` does not have any functionality when the `interface` argument is specified, and can be safely set if using in a script.\n- The physical transport is assumed to be Ethernet (802.3). Others, such as Wi-Fi (802.11), are currently not tested or considered. I plan to address this in the future, and am definitely open to pull requests or issues related to this, including error reports.\n- **Exceptions will be handled silently and returned as a None.** If you run into problems, you can set `DEBUG` to true and get more     information about what's happening. If you're still having issues, please create an [issue on GitHub](https://github.com/GhostofGoes/getmac/issues) and include the output with `DEBUG` enabled.\n\n## Commands and techniques by platform\n- Windows\n    - Commands: `getmac.exe`, `ipconfig.exe`, `arp.exe`, `wmic.exe`\n    - Libraries: `uuid`, `ctypes`, `socket`\n- Linux/Unix\n    - Commands: `arp`, `ip`, `ifconfig`, `netstat`, `ip link`, `lanscan`\n    - Libraries: `uuid`, `fcntl`, `socket`\n    - Files: `/sys/class/net/{iface}/address`, `/proc/net/arp`\n    - Default interfaces: `/proc/net/route`, `route`, `ip route list`\n- Mac OSX (Darwin)\n    - `networksetup`\n    - Same commands as Linux\n- WSL\n    - Windows commands are used for remote hosts\n    - Unix commands are used for interfaces\n- OpenBSD\n    - Commands: `ifconfig`, `arp`\n    - Default interfaces: `route`\n- FreeBSD\n    - Commands: `ifconfig`, `arp`\n    - Default interfaces: `netstat`\n- Android\n    - Commands: `ip link`\n\n## Platforms currently supported\nAll or almost all features should work on \"supported\" platforms. While other versions of the same family or distro may work, they are untested and may have bugs or missing features.\n\n- Windows\n    - Desktop: 7, 8, 8.1, 10, 11 (thanks @StevenLooman for testing Windows 11!)\n    - Server: TBD\n    - Partially supported (untested): 2000, XP, Vista\n- Linux distros\n    - CentOS/RHEL 6+\n    - Ubuntu 16.04+ (15.10 and older should work, but are untested)\n    - Fedora (24+)\n- Mac OSX (Darwin)\n    - The latest two versions probably (TBD)\n- Android (6+)\n- Windows Subsystem for Linux (WSL)\n- FreeBSD (11+)\n- OpenBSD\n- Docker\n\n## Docker\nAdd `-v /proc/1/net/arp:/host/arp -e ARP_PATH=/host/arp` to access arp table of host inside container in bridge network mode.\n\n```bash\ndocker build -f packaging/Dockerfile -t getmac .\ndocker run -it getmac:latest --help\ndocker run -it getmac:latest --version\ndocker run -it getmac:latest -n localhost\ndocker run --rm -it -v /proc/1/net/arp:/host/arp -e ARP_PATH=/host/arp getmac:latest -n 192.168.0.1\n```\n\n## Caveats\n- Depending on the platform, there could be a performance detriment, due to heavy usage of regular expressions.\n- Platform test coverage is imperfect. If you're having issues, then you might be using a platform I haven't been able to test. Keep calm, open a GitHub issue, and I'd be more than happy to help.\n\n## Known Issues\n- Linux, WSL: Getting the mac of a local interface IP does not currently work (`getmac --ip 10.0.0.4` will fail if `10.0.0.4` is the IP address of a local interface). This issue may be present on other POSIX systems as well.\n- Hostnames for IPv6 devices are not yet supported.\n- Windows: the \"default\" (used when no arguments set or specified) of selecting the default route interface only works effectively if `network_request` is enabled. If not, `Ethernet` is used as the default.\n- IPv6 support is good but lags behind IPv4 in some places and isn't as well-tested across the supported platform set.\n\n## Background and history\nThe Python standard library has a robust set of networking functionality, such as `urllib`, `ipaddress`, `ftplib`, `telnetlib`, `ssl`, and more. Imagine my surprise, then, when I discovered there was not a way to get a seemingly simple piece of information: a MAC address. This package was born out of a need to get the MAC address of hosts on the network without needing admin permissions, and a cross-platform way get the addresses of local interfaces.\n\nIn Fall 2018 the package name changed to `getmac` from `get-mac`. This affected the package name, the CLI script, and some of the documentation. There were no changes to the core library code. While both package names will updated on PyPI, the use of `getmac` is preferred.\n\nIn Summer 2020, the code was significantly refactored, moving to a class-based structure and significantly improving performance and accuracy. See [docs/rewrite.md](docs/rewrite.md) for details.\n\n## Contributing\nContributors are more than welcome! See the [contribution guide](CONTRIBUTING.md) to get started, and checkout the [todo list](TODO.md) for a full list of tasks and bugs.\n\nBefore submitting a PR, please make sure you've completed the [pull request checklist](CONTRIBUTING.md#Code_requirements)!\n\nThe [Python Discord server](https://discord.gg/python) is a good place to ask questions or discuss the project (Handle: @KnownError#0001).\n\n### Contributors\n- Christopher Goes (@ghostofgoes) - Author and maintainer\n- Calvin Tran (@cyberhobbes) - Windows interface detection improvements\n- Daniel Flanagan (@FlantasticDan) - Code cleanup\n- @emadmahdi - Android fixes\n- Izra Faturrahman (@Frizz925) - Unit tests using the platform samples\n- Jose Gonzalez (@Komish) - Docker container and Docker testing\n- @fortunate-man - Awesome usage videos\n- @martmists - legacy Python compatibility improvements\n- @hargoniX - scripts and specfiles for RPM packaging\n- Ville Skyttä (@scop) - arping lookup support\n- Tomasz Duda (@tomaszduda23) - support for docker in network bridge mode\n- Steven Looman (@StevenLooman) - Windows 11 testing\n- Reimund Renner (@raymanP) - macOS fixes\n\n## Sources\nMany of the methods used to acquire an address and the core logic framework are attributed to the CPython project's UUID implementation.\n\n- https://github.com/python/cpython/blob/master/Lib/uuid.py\n- https://github.com/python/cpython/blob/2.7/Lib/uuid.py\n\n### Other notable sources\n- [_unix_fcntl_by_interface](https://stackoverflow.com/a/4789267/2214380)\n- [_windows_get_remote_mac_ctypes](goo.gl/ymhZ9p)\n- [String joining](https://stackoverflow.com/a/3258612/2214380)\n\n## License\nMIT. Feel free to copy, modify, and use to your heart's content. Enjoy :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostofgoes%2Fgetmac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostofgoes%2Fgetmac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostofgoes%2Fgetmac/lists"}