import socket hostname = 'maps.google.com' addr = socket.gethostbyname(hostname) print 'The address of', hostname, 'is', addr
# python getIP.py The address of maps.google.com is 74.125.128.138
No comments:
Post a Comment