DNS名称解析等综合工具iphone DNS Tools

DNS名称解析等综合工具iphone DNS Tools

  • 更新时间:05-13
  • 下载次数:91
  • 软件大小: 0.2MB
  • 软件类型: 正式版
  • 软件语言:简体中文
  • 软件评分:

软件平台:iphone

无插件 安全 正式版

软件介绍


  一款DNS的综合工具,提供您在终端模式下的DNS名称解析。

  下图为使用nslookup工具来查询www.hinet.net的dns相关资讯。

  本站附件下载

  安装来源:http://conceitedsoftware.com/iphone/

  官方网站:http://wickedpsyched.com/iphone/nettools/

  官方使用原文:http://wickedpsyched.com/iphone/dns

  imac /perl-5.8.8/ nm /heavenly/usr/lib/libc.dylib | grep gethostbyname

  3009f634 T __dns_gethostbyname

  3009fea0 T __ht_gethostbyname

  300a00b0 T __nis_gethostbyname

  300a0770 T ___gethostbyname2_r

  300a0824 T ___gethostbyname_r

  U __dns_gethostbyname

  U __ht_gethostbyname

  3002feac T _gethostbyname

  300a07dc T _gethostbyname2

  300a0434 t _gethostbyname_internal

  U _gethostbyname

  U _gethostbyname

  U _gethostbyname

  U _gethostbyname

  U _gethostbyname

  U _gethostbyname

  tinyproxy is now working with the new libresolv.a!!!

  (Wed Aug 29) turns out that this is NOT news, or as they say here

  I'm just a UNIX chap, and not an OSX chap, and it turns out that the iPhone really is OSX *sigh*

  DNS is broken

  (update Aug 17th DNS fixed kinda)

  Using the resolver from this webpage (see link above):

  arm-apple-darwin-cc test.c ./libresolv.a

  -bash-3.2# ./a.out www.theregister.com

  Success!

  The iPhone system resolver does not work for GNU code, if you

  don't use the resolver above.

  -bash-3.2# ./a.out www.theregister.com

  gethostbyname() failed

  (previous discovery prior to learning libresolv.a fixes the problem)

  Sites with CNAMES don't resolve with the toolchain right now:

  [imac:~] % host www.theregister.co.uk

  www.theregister.co.uk has address 212.100.234.54

  [imac:~] % host www.theregister.com

  www.theregister.com is an alias for glb.theregister.com.

  www.bbc.co.uk is an alias for www.bbc.net.uk.

  [imac:~] % host www.bbc.co.uk

  www.bbc.co.uk is an alias for www.bbc.net.uk.

  #include

  #include

  struct hp* result;

  int main(int argc, char **argv) {

  result = gethostbyname(argv[1]);

  if (result == NULL) {

  printf("gethostbyname() failedn");

  }

  else{ printf("Success!n");}

  }

  arm-apple-darwin-cc test.c

  As you can see all the cnames are failing to resolve, A records are fine.

  This breaks tinyproxy and other code right now:

  # ./a.out www.theregister.co.uk

  Success!

  # ./a.out www.theregister.com

  gethostbyname() failed

  # ./a.out glb.theregister.com

  Success!

  # ./a.out www.bbc.co.uk

  gethostbyname() failed

  # ./a.out www.bbc.net.uk

  Success!

  Oh and h_addr_list[0] from the resolver libs does not seem to

  even be present to query.

  I found out this the hardway... tinyproxy now uses this code:

  22:59 < core> so this is kinda important!

  22:59 < core> memcpy(addr, result->h_addr_list[0], result->h_length);

  22:59 < core> fails on iphone

  22:59 < core> but memcpy(addr, result->h_addr, result->h_length);

  22:59 < core> works

网友评论