This script used to get the Mac Address of the remote computer.
Run as System or Logged in User.
import os
import re
networkInformation = os.popen("ipconfig /all").read()
networkInterfaces = re.findall('Description . . . . . . . . . . . :(.*)', networkInformation)
physicalAddresses = re.findall('Physical Address. . . . . . . . . :(.*)', networkInformation)
count = len(networkInterfaces)
print "Mac Address(-es) of " + os.environ['COMPUTERNAME']
for index, interface in enumerate(networkInterfaces):
print interface + ":" + physicalAddresses[index]
Comments