# From chapter 4 of "Stealing the Network", "h3x's Adventures in Networkland", # the last line of text. # # H3x herself could of course just read it. # But mere mortals like us need to decode it, eh? # # Now, in any other context, I would document, test, and sign this. # But here? Let 'er rip. h3x = "49207374696c6c206f776e20796f757220617373" def pairs(hexstr): if not hexstr: return [] return [ hexstr[0:2] ] + pairs(hexstr[2:]) # Recursion, anyone? def letter(pair): # Base 16 is just like base 10 return chr(int(pair, 16)) # ... if you have six extra fingers. def joinem(letters): return ''.join(letters) # Python's string API. Sigh. print(joinem([letter(p) for p in pairs(h3x)]))