我目前这样做是为了返回主机的IP地址或返回inaddr.arpa记录: perl -pe 's/.* mail is .*//; s/\n//;s/.* has address//;s/.* domain name pointer //;s/.* not found: .*/'$1'/g';
是否有更授权的工具只提供IP地址/inaddr
我想从客户端IP地址解析域名。为了进行测试,我使用了stackoverflow,如下所示。但是当我使用ip来解析域名时,我仍然只能得到IP作为结果。String ip = InetAddress.getByName("www.stackoverflow.com").getHostAddress(); System.out.println(InetAddress.getByName(<em