IpconfigExe¶
- class getmac.getmac.IpconfigExe[source]¶
Bases:
MethodUses
ipconfig.exeto find interface MAC addresses on Windows.This is generally pretty reliable and works across a wide array of versions and releases. I’m not sure if it works pre-XP though.
The interface can be the adapter name (e.g.
Ethernet 3) or its description (e.g.Intel(R) Ethernet Connection I217-V). Case is ignored, like on Windows.Note
Adapter names are only found in English output, since the headers are translated (e.g. “Ethernet adapter Ethernet 3:” is “Carte Ethernet Ethernet 3 :” in French). Descriptions are found if the label is “Description”. The MAC is found in any language.
Microsoft Documentation: ipconfig
Attributes Summary
The type of method, e.g. does it get the MAC of a interface.
Platforms supported by a method.
Methods Summary
get(arg)Core logic of the method that performs the lookup.
test()Low-impact test that the method is feasible, e.g. a command exists.
Attributes Documentation
- method_type: str = 'iface'¶
The type of method, e.g. does it get the MAC of a interface.
Allowed values:
ip
ip4
ip6
iface
default_iface
Methods Documentation