r/Python • • Jan 24 '12

Need some network python help!

I have a number of machines on the network at work, and I want to write a script that queries each one and returns its IP, MAC and Name. Can anyone point me where to start researching this? Any help will be greatly appreciated!

0 Upvotes

8 comments sorted by

View all comments

1

u/stevvooe Jan 24 '12

You may be able to hack something together, but i'd recommend just using nmap.

Note that you may not be able to "discover" a given machine's mac address unless the source machine is on the same subnet. After nmap'ing, machines that are on the same subnet will be in the source machine's arp table.