Python - local ip & hostname | Cyber Community | Hi-Tech World - CYBSECGROUP
Welcome to the CYBSECGROUP Forum
You have the opportunity to get acquainted with interesting projects in an interesting environment
Registration

Python local ip & hostname

  • Thread starter კახა ჯელაძე
  • Start date

კახა ჯელაძე

სტუმარი
#1
Python:
import socket
hostname = socket.gethostname()
IPAddr = socket.gethostbyname(hostname)
print("Your Computer Name is:" + hostname)
print ("Your Computer IP Address is:" + IPAddr)
 
Last edited by a moderator:
Likes: G30RG14N