PTR by Defenestrator

import socket,binascii
while 1:s=raw_input();print('.'.join(binascii.b2a_hex(socket.inet_pton(10,s))[::-1])+'.ip6'if':'in s else'.'.join(s.split('.')[::-1])+'.in-addr')+'.arpa'

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top