Posted by Shrike Thu 15th Mar 2007 08:42 - Syntax is Python - 90 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
-
def parseWebchatIP(hexip):
-
"""Parse webchat hex-format ip to decimal ip"""
-
ip = []
-
-
for i in range(2,len(hexip)+2,2):
-
try:
-
dec = int(hexip[i-2:i], 16)
-
except ValueError:
-
return None
-
ip.append(str(dec))
-
-
return ".".join(ip)
-
PermaLink to this entry https://pastebin.co.uk/11892
Posted by Shrike Thu 15th Mar 2007 08:42 - Syntax is Python - 90 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Comments: 0