How to display all device IP address,Host Name, Manufacture Name,Physical address etc which are connected in LAN using python programming.
With help of arp - a I am able to get IP address mac and type(As shown below)
but not able to get Manufacture Name and Host name I want to display the list as this
You can find Host Name using Following Method:
import socket
# Replace with your ip address
ip_address = "192.168.221.31"
print(socket.getfqdn(ip_address))
Use Following Code to find Manufacture name from mac address
import requests
for addr in ['B4:CD:27:81:F4:1C']:
vendor = requests.get('http://api.macvendors.com/' + addr).text
print(addr, vendor)
Note: For above method internet connectivity is required
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With