Python code to find : device name, device IP address, hexadecimal IP address and device mac address.

import socket import uuid hostname = socket.gethostname() IPAddr = socket.gethostbyname(hostname) hexIP = socket.inet_aton(IPAddr).hex() macAddr = ':'.join(['{:02x}'.format( (uuid.getnode() >> elements) & 0xff) for elements in range(0,2*6,2)][::-1]) print("Your Computer Name is: " + hostname) print("Your Computer IP Addreress is : " + IPAddr) print("Your Computer hex IP is: " + hexIP) print("Your Computer Mac Address is: "... Continue Reading →

Start a Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started