Get remote MAC address using Python and Linux

myk_raniu picture myk_raniu · Jan 6, 2010 · Viewed 21.3k times · Source

How do I get the MAC address of a remote host on my LAN? I'm using Python and Linux.

Answer

YOU picture YOU · Jan 6, 2010

You can try running command arp -a

Here is few links about Mac Address grabbing (not tested)

In Linux/Unix, arping,

http://www.ibm.com/developerworks/aix/library/au-pythocli/

In Windows, using IP Helper API through ctypes

http://code.activestate.com/recipes/347812/