Releases: GhostofGoes/getmac
Releases · GhostofGoes/getmac
0.8.1
0.8.0
Added
- OpenBSD support
- FreeBSD support
- Python logging is now used instead of
print
(logger:getmac
) - Include tests in the source distribution
- (CLI) Added aliases for
--no-network-requests
:-N
and--no-net
- (CLI) New argument:
-v
/--verbose
Changed
- Errors are now logged instead of raising a
RuntimeWarning
- Improved Ubuntu support
- Performance improvements
Development
- Significant increase in overall test coverage
- Fixed and migrated the sample tests to
pytest
- Added tests for the CLI
0.7.0
Added
- Type annotations (PEP 484)
Removed
- Dropped support for Python 2.6
- Removed the usage of third-party packages (
netifaces
,psutil
,scapy
, andarpreq
).
This should improve the performance of lookups of non-existant interfaces
or hosts, since feature was punishing that path without providing much value.
If you want to use these packages directly, I have a guide on how to do so on a
GitHub Gist.
Changed
- Significantly improved the performance of the common cases on Linux
for interfaces and remote hosts - Improved POSIX interface performance. Commands specific to OSX
will be run only on that platform, and vice-versa. - Significantly improved the speed and accuracy of determining
the default interface on Linux - Python 2 will install an executor named getmac2 and Python 3 an
executor named getmac so they don't conflict when both RPMs are
installed on the same system (Credit: @hargoniX) - The
warnings
module will only be imported if a error/warning
occurs (improve compatibility with some freezers, notably PyInstaller) - Improved system platform detection
- Various other minor performance improvements
Development
- Added unit tests for the samples (Credit: @frizz925)
- Scripts for building RPMs in the /scripts directory (Credit: @hargoniX)
- Improved code quality and health checks
- Include the CHANGELOG on the PyPI project page
- Using
pytest
for all tests now instead ofunittest
Documentation
- Added instructions on how to build a Debian package (Credit: @kofrezo)
0.6.0
Added
- Windows default interface detection if
network_request
is enabled (Credit: @cyberhobbes) - Docker container (Credit: @komish)
Changed
- Changed name to
getmac
. This applies to everything, including
command line tool, PyPI, GitHub, and the documentation.
This is a breaking change, but needed to happen to remove
a huge amount of ambiguity that was causing issues with packaging,
documentation, and several other efforts, not to mention my sanity.
Long-term, the only downside is a conflict on Windows CLI withgetmac.exe
. - Use proper Python 2-compatible print functions (Credit: @Martmists)
Removed
- Support for Python 2.5. It is not feasible to test, and potentially
breaks some useful language features, such as__future__
- Variables PORT and DEBUG from top-level package imports, since changing
them would have no actual effect on execution. Instead, usegetmac.getmac.DEBUG
.
Dev
- Added example videos demonstrating usage (Credit: @fortunate-man)
- Added contribution guide
- Added documentation on ReadTheDocs
- Added a manpage
0.5.0
Added
- Full support for Windows Subsystem for Linux (WSL). This is working for
all features, including default interface selection! The only edge case
is lookup of remote host IP addresses that are actually local interfaces
won't resolve to a MAC (which should be ff-ff-ff-ff-ff-ff).
Changed
- Require
argparse
if Python version is 2.6 or older
Dev
- Updated tox tests: added Jython and IronPython, removed 2.6
0.4.0
Added:
- New methods for remote host MACs
- Windows:
arp
- POSIX:
arpreq
package
- Windows:
- New methods for interface MACs
- Windows:
wmic nic
- Windows:
- DEBUG levels: DEBUG value is now an integer, and increasing it will
increase the amount and verbosity of output. On the CLI, it can be
configured by increasing the amount of characters for the debug argument,
e.g. '-dd' for DEBUG level 2. - Jython support (Note: on Windows Jython currently only works with interfaces)
- IronPython support
Changed
- Significant performance improvement for remote hosts. Previously,
the average forget_mac_address(ip='10.0.0.100')
was 1.71 seconds.
Now, the average is12.7 miliseconds
, with the special case of a unpopulated
arp table being only slightly higher. This was brought about by changes in
how the arp table is populated. The original method was to use the
host'sping
command to send an ICMP packet to the host. This took time,
which heavily delayed the ability to actually get an address. The solution
is to instead simply send a empty UDP packet to a high port. The port
this packet is sent to can be configured using the module variablegetmac.PORT
. - "Fixed" resolution of localhost/127.0.0.1 by hardcoding the response.
This should resolve a lot of problematic edge cases. I'm ok with this
for now since I don't know of a case when it isn't all zeroes. - Greatly increased the reliability of getting host and interface MACs on Windows
- Improved debugging output
- Tightened up the size of
getmac.py
- Various minor stability and performance improvements
- Add LICENSE to PyPI package
Removed
- Support for Python 3.2 and 3.3. The total downloads from PyPI with
those versions in August was ~53k and ~407K, respectfully. The majority
of those are likely from automated testing (e.g. TravisCI) and not
actual users. Therefore, I've decided to drop support to simplify
development, especially since before 3.4 the 3.x series was still
very much a "work in progress".
Dev
- Added automated tests for Windows using Appveyor
- Tox runner for tests
- Added github.io page
- Improved TravisCI testing
0.3.0
Added
- Attempt to use various 3rd-party Python modules if they're installed
psutil
: Interface MACs on all platformsscapy
: Interface MACs and Remote MACs on all platformsnetifaces
: Interface MACs on Non-Windows platforms
- New methods for remote MACs
- POSIX:
ip neighbor show
, Abuse ofuuid._arp_getnode()
- POSIX:
- New methods for Interface MACs
- POSIX:
lanscan -ai
(HP-UX)
- POSIX:
Changed
- Certain critical failures that should never happen will now warn
instead of failing silently. - Added a sanity check to the
ip6
argument (IPv6 addresses) - Improved performance in some areas
- Improved debugging output
Fixed
- Major Bugfix: search of
proc/net/arp
would return shorter addresses in the
same subnet if they came earlier in the sequence. Example: a search for
192.168.16.2
on Linux would instead return the MAC address of
192.168.16.254
with no errors or warning whatsoever. - Significantly improved default interface detection. Default
interfaces are now properly detected on Linux and most other
POSIX platforms withip
orroute
commands available, or the
netifaces
Python module.
Dev
- Makefile
- Vagrantfile to spin up testing VMs for various platforms using Vagrant
- Added more samples of command output on platforms (Ubuntu 18.04 LTS)
0.2.2
Added
- Short versions of CLI arguments (e.g. "-i" for "--interface")
Changed
- Improved usage of "ping" across platforms and IP versions
- Various minor tweaks for performance
- Improved Windows detection
Fixed
- Use of ping command with hostname
Dev:
- Improvements to internal code
Note: Nothing changed in 0.2.1, it was simply a workaround for PyPI not allowing changes without a new version.
0.2.0
Added
- Checks for default interface on Linux systems
- New methods of hunting for addresses on Windows, Mac OS X, and Linux
Changed
- CLI will output nothing if it failed, instead of "None"
- CLI will return with 1 on failure, 0 on success
- No CLI arguments now implies the default host network interface
- Added an argumnent for debugging:
--debug
- Removed
-d
option from--no-network-requests
Fixed
- Interfaces on Windows and Linux (including Bash for Windows)
- Many bugs
Removed
- Support for Python 2.6 on the CLI
Dev
- Overhaul of internals
0.1.0
Added
- Addition of a terminal command:
get-mac
- Ability to run as a module from the command line:
python -m getmac
Changed
arp_request
argument was renamed tonetwork_request
- Updated docstring
- Slight reduction in the size of getmac.py
Dev
- Overhauled the README
- Moved tests into their own folder
- Added Python 3.7 to list of supported snakes