title: Find mac address on python
body: <p>I have searched for an identifier and I tried to find mac address for any connected device on my server but the problem is that the output returns empty for example</p>
  
  <p><code>a = os.popen("arp -a  192.168.6.150 | awk '{print $4}'").readlines()</code></p>
  
  <p>a is empty</p>
  
  <p>I'm working on captive portal page for untangle.
  I want to get the mac address from ip of device on network.
  This code runs on Apache server.</p>
  
  <pre><code>from mod_python import apache
  from mod_python import util
  </code></pre>