Created
June 4, 2013 09:42
-
-
Save gdugas/5704815 to your computer and use it in GitHub Desktop.
Return ip in hex format: 192.168.1.1 => C0A80101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gethostip(ip): | |
return "".join([("%0.2x" % int(i)).upper() for i in ip.split('.')]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment