# = find any character A-F, upper and lower case, as well as any number Process = subprocess.Popen(, stdout=subprocess.PIPE) #PING to place target into system's ARP cache # This will only work within the netmask of the machine the program is running on cross router MACs will be lost To show you my python ping approach this is the code: import pdb, os to compound the problem on deployment there could be up to 5000 computers on the network that needs to be logged. But how do I get the MAC Address from the IP address? I initially thought ping the ip and grab the MAC from the ARP but I think that will only work if the IP address is on the same subnet. My next step and the bit I'm having difficulty with is I ping the ip address (from within my python program) which works. Therefore I have tried to do this in a two stage approach, firstly I get the data including ip address from nmap which works fine. The MAC address is not included in the nmap out put and from what I have read it seems to be a bit flakey. This is one of my first ones, basically I've taken this guy craig 's normalisation technique and used to to create outputs. The approach I have taken is to use nmap as a basis to get the ip address and other information I need. Python and MAC addresses In the last few days I've started to learn python and gone a bit python mad with it, as a result I have a bunch of test scripts where I have been learning to do stuff.
Python mac address f software#
My knowledge of network orientated programming is limited as I have been working in other areas of software engineering for the past 4 years. Uses of MAC address : Useful in places where IP address change frequently. NIC helps in connection of a computer with other computers in the network. The issue I'm having is that part of the project requires me to be able to capture the MAC addresses of all of the devices that are connected to the network. MAC address also known as physical address is the unique identifier that is assigned to the NIC (Network Interface Card) of the computer.
Due to severe time constraints where possible I'm using opensource code.
I'm currently working on a project that centers around network management. I'm wondering if you could help me or point me in the right direction.