Tuesday, December 1, 2020

Find IP address of any website by using python with Eaglesoft


import socket as s
my_hostname=s.gethostname()
print("Your host name is:" + my_hostname)
my_ip=s.gethostbyname(my_hostname)
print("Your ip adress is: "+ my_ip)
webhost="google.com"
web_ip=s.gethostbyname(webhost)
print("IP adress of "+webhost+ " is :"+web_ip) 

No comments:

Post a Comment