def teredoAddrExtractInfo(x):
 addr = inet_pton(socket.AF_INET6, x)
 server = inet_ntop(socket.AF_INET, addr[4:8])
 flag = struct.unpack('!H', addr[8:10])[0]
 mappedport = struct.unpack('!H', strxor(addr[10:12], ('\xff' * 2)))[0]
 mappedaddr = inet_ntop(socket.AF_INET, strxor(addr[12:16], ('\xff' * 4)))
 return (server, flag, mappedaddr, mappedport)

def teredoAddrExtractInfo ( x ) : addr = inet_pton ( socket . AF_INET6 , x ) server = inet_ntop ( socket . AF_INET , addr [ 4 : 8 ] ) flag = struct . unpack ( '!H' , addr [ 8 : 10 ] ) [ 0 ] mappedport = struct . unpack ( '!H' , strxor ( addr [ 10 : 12 ] , ( '\xff' * 2 ) ) ) [ 0 ] mappedaddr = inet_ntop ( socket . AF_INET , strxor ( addr [ 12 : 16 ] , ( '\xff' * 4 ) ) ) return ( server , flag , mappedaddr , mappedport )
extract information from a teredo address .