I am running python on the iOS App Pythonista 3. When I try to get an IPv6 address it ends up returning bytes rather than a formatted address. Right now I am trying to find a way to either get the address properly without bytes, or to find a way to make the bytes become the address. Here is the code I ran to get the address:
def getIPv6Addr(input):
return socket.getaddrinfo(input, None, socket.AF_INET6)
and here was the output:
[(30, 2, 17, '', (30, '\x00\x00\x00\x00\x00\x00&\x07\xf8\xb0@\x00\x08\x14')), (30, 1, 6, '', (30, '\x00\x00\x00\x00\x00\x00&\x07\xf8\xb0@\x00\x08\x14'))]
Edit: The alternative solution is to find what type of encoding is being used to turn this data into bytes.
What Makes:
2607:f8b0:4000:814::200e
become
\x00\x00\x00\x00\x00\x00&\x07\xf8\xb0@\x00\x08\x14