Skip to content

Instantly share code, notes, and snippets.

@Leask
Created October 20, 2013 21:19
Show Gist options
  • Select an option

  • Save Leask/7075483 to your computer and use it in GitHub Desktop.

Select an option

Save Leask/7075483 to your computer and use it in GitHub Desktop.
Access your website just like dialing a phone number. TIPS: $ curl http://[SCRIPT RETURNS] EXAMPLE: $ curl http://3237077094
#!/usr/bin/env python
import socket
import struct
def ip2long(ip):
packedIP = socket.inet_aton(ip)
return struct.unpack("!L", packedIP)[0]
print ip2long('192.241.224.102') # your website ip address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment