Booter said:
Hello all,
I am new to python ans was wondering if there was a way to get the mac
address from the local NIC?
Thanks for your help.
This is supposed to return the MAC address, but I am not sure it does.
The documentation says:
"""
getnode( )
Get the hardware address as a 48-bit positive integer. The first time
this runs, it may launch a separate program, which could be quite slow.
If all attempts to obtain the hardware address fail, we choose a random
48-bit number with its eighth bit set to 1 as recommended in RFC 4122.
"Hardware address" means the MAC address of a network interface, and on
a machine with multiple network interfaces the MAC address of any one of
them may be returned.
"""
So the return value isn't *guaranteed* to be an ethernet address, and
I'm not sure whether that code gets any regular testing.
regards
Steve