Missing required fields
Posted by Shrike Thu 15th Mar 2007 08:42 - Syntax is Python - 173 views
Download | New Post | Modify | Hide line numbers
  1. def parseWebchatIP(hexip):
  2.     """Parse webchat hex-format ip to decimal ip"""
  3.     ip = []
  4.  
  5.     for i in range(2,len(hexip)+2,2):
  6.         try:
  7.             dec = int(hexip[i-2:i], 16)
  8.         except ValueError:
  9.             return None
  10.         ip.append(str(dec))
  11.  
  12.     return ".".join(ip)
  13.  

PermaLink to this entry https://pastebin.co.uk/11892
Posted by Shrike Thu 15th Mar 2007 08:42 - Syntax is Python - 173 views
Download | New Post | Modify | Hide line numbers

 

Comments: 0