亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? recurse.pm

?? 雷傲極酷超級論壇LeoBBS X 040601 簡體正式版
?? PM
字號:
package Net::DNS::Resolver::Recurse;

# $Id: Recurse.pm,v 1.3 2003/05/22 06:19:49 ctriv Exp $

use strict;
use Net::DNS::Resolver;

use vars qw($VERSION @ISA);

$VERSION = $Net::DNS::VERSION;
@ISA = qw(Net::DNS::Resolver);

sub hints {
  my $self = shift;
  my @hints = @_;
  print ";; hints(@hints)\n" if $self->{'debug'};
  if (!@hints && $self->nameservers) {
    $self->hints($self->nameservers);
  } else {
    $self->nameservers(@hints);
  }
  print ";; verifying (root) zone...\n" if $self->{'debug'};
  # bind always asks one of the hint servers
  # for who it thinks is authoritative for
  # the (root) zone as a sanity check.
  # Nice idea.
  my $packet = $self->query(".", "NS", "IN");
  my %hints = ();
  if ($packet) {
    if (my @ans = $packet->answer) {
      foreach my $rr (@ans) {
        if ($rr->name =~ /^\.?$/ and
            $rr->type eq "NS") {
          # Found root authority
          my $server = lc $rr->rdatastr;
          $server =~ s/\.$//;
          print ";; FOUND HINT: $server\n" if $self->{'debug'};
          $hints{$server} = [];
        }
      }
      foreach my $rr ($packet->additional) {
        print ";; ADDITIONAL: ",$rr->string,"\n" if $self->{'debug'};
        if (my $server = lc $rr->name and
            $rr->type eq "A") {
          #print ";; ADDITIONAL HELP: $server -> [".$rr->rdatastr."]\n" if $self->{'debug'};
          if ($hints{$server}) {
            print ";; STORING IP: $server IN A ",$rr->rdatastr,"\n" if $self->{'debug'};
            push @{ $hints{$server} }, $rr->rdatastr;
          }
        }
      }
    }
    foreach my $server (keys %hints) {
      if (!@{ $hints{$server} }) {
        # Wipe the servers without lookups
        delete $hints{$server};
      }
    }
    $self->{'hints'} = \%hints;
  } else {
    $self->{'hints'} = {};
  } 
  if (%{ $self->{'hints'} }) {
    if ($self->{'debug'}) {
      print ";; USING THE FOLLOWING HINT IPS:\n";
      foreach my $ips (values %{ $self->{'hints'} }) {
        foreach my $server (@{ $ips }) {
          print ";;  $server\n";
        }
      }
    }
  } else {
    warn "Server [".($self->nameservers)[0]."] did not give answers";
  }

  # Disable recursion flag.
  $self->recurse(0);

  return $self->nameservers( map { @{ $_ } } values %{ $self->{'hints'} } );
}

# $res->query_dorecursion( args );
# Takes same args as Net::DNS::Resolver->query
# Purpose: Do that "hot pototo dance" on args.
sub query_dorecursion {
  my $self = shift;
  my @query = @_;

  # Make sure the hint servers are initialized.
  $self->hints unless $self->{'hints'};

  # Make sure the authority cache is clean.
  # It is only used to store A records of
  # authoritative name servers.
  $self->{'authority_cache'} = {};

  # Obtain real question Net::DNS::Packet
  my $query_packet = $self->make_query_packet(@query);

  # Seed name servers with hints
  return $self->_dorecursion( $query_packet, ".", $self->{'hints'}, 0);
}

sub _dorecursion {
  my $self = shift;
  my $query_packet = shift;
  my $known_zone = shift;
  my $known_authorities = shift;
  my $depth = shift;
  my $cache = $self->{'authority_cache'};

  print ";; _dorecursion() depth=[$depth] known_zone=[$known_zone]\n" if $self->{'debug'};
  die "Recursion too deep, aborting..." if $depth > 255;

  $known_zone =~ s/\.*$/./;

  # Get IPs from authorities
  my @ns = ();
  foreach my $ns (keys %{ $known_authorities }) {
    if (scalar @{ $known_authorities->{$ns} }) {
      $cache->{$ns} = $known_authorities->{$ns};
      push (@ns, @{ $cache->{$ns} });
    } elsif ($cache->{$ns}) {
      $known_authorities->{$ns} = $cache->{$ns};
      push (@ns, @{ $cache->{$ns} });
    }
  }

  if (!@ns) {
    my $found_auth = 0;
    if ($self->{'debug'}) {
      require Data::Dumper;
      print ";; _dorecursion() Failed to extract nameserver IPs:\n";
      print Data::Dumper::Dumper([$known_authorities,$cache]);
    }
    foreach my $ns (keys %{ $known_authorities }) {
      if (!@{ $known_authorities->{$ns} }) {
        print ";; _dorecursion() Manual lookup for authority [$ns]\n" if $self->{'debug'};
        my $auth_packet =
          $self->_dorecursion
          ($self->make_query_packet($ns,"A"),  # packet
           ".",               # known_zone
           $self->{'hints'},  # known_authorities
           $depth+1);         # depth

        if ($auth_packet and my @ans = $auth_packet->answer) {
          print ";; _dorecursion() Answers found for [$ns]\n" if $self->{'debug'};
          foreach my $rr (@ans) {
            if ($rr->type eq "CNAME") {
              # Follow CNAME
              if (my $server = lc $rr->name) {
                $server =~ s/\.*$/./;
                if ($server eq $ns) {
                  my $cname = lc $rr->rdatastr;
                  $cname =~ s/\.*$/./;
                  print ";; _dorecursion() Following CNAME ns [$ns] -> [$cname]\n" if $self->{'debug'};
                  $known_authorities->{$cname} ||= [];
                  delete $known_authorities->{$ns};
                  next;
                }
              }
            } elsif ($rr->type eq "A") {
              if (my $server = lc $rr->name) {
                $server =~ s/\.*$/./;
                if ($known_authorities->{$server}) {
                  my $ip = $rr->rdatastr;
                  print ";; _dorecursion() Found ns: $server IN A $ip\n" if $self->{'debug'};
                  $cache->{$server} = $known_authorities->{$server};
                  push (@{ $cache->{$ns} }, $ip);
                  $found_auth++;
                  next;
                }
              }
            }
            print ";; _dorecursion() Ignoring useless answer: ",$rr->string,"\n" if $self->{'debug'};
          }
        } else {
          print ";; _dorecursion() Could not find A records for [$ns]\n" if $self->{'debug'};
        }
      }
    }
    if ($found_auth) {
      print ";; _dorecursion() Found $found_auth new NS authorities...\n" if $self->{'debug'};
      return $self->_dorecursion( $query_packet, $known_zone, $known_authorities, $depth+1);
    }
    print ";; _dorecursion() No authority information could be obtained.\n" if $self->{'debug'};
    return undef;
  }

  # Cut the deck of IPs in a random place.
  print ";; _dorecursion() cutting deck of (".scalar(@ns).") authorities...\n" if $self->{'debug'};
  splice(@ns, 0, 0, splice(@ns, int(rand @ns)));

  print ";; _dorecursion() First nameserver [$ns[0]]\n" if $self->{'debug'};
  $self->nameservers(@ns);

  if (my $packet = $self->send( $query_packet )) {
    my $of = undef;
    print ";; _dorecursion() Response received from [",$self->answerfrom,"]\n" if $self->{'debug'};
    if (my $status = $packet->header->rcode) {
      if ($status eq "NXDOMAIN") {
        # I guess NXDOMAIN is the best we'll ever get
        print ";; _dorecursion() returning NXDOMAIN\n" if $self->{'debug'};
        return $packet;
      } elsif (my @ans = $packet->answer) {
        print ";; _dorecursion() Answers were found.\n" if $self->{'debug'};
        return $packet;
      } elsif (my @authority = $packet->authority) {
        my %auth = ();
        foreach my $rr (@authority) {
          if ($rr->type eq "NS") {
            $of = lc $rr->name;
            $of =~ s/\.*$/./;
            if (length $of <= length $known_zone) {
              print ";; _dorecursion() Deadbeat name server did not provide new information.\n" if $self->{'debug'};
            } elsif ($of =~ /$known_zone$/) {
              my $server = lc $rr->rdatastr;
              print ";; _dorecursion() FOUND closer authority for [$of] at [$server].\n" if $self->{'debug'};
              $auth{$server} ||= [];
            } else {
              print ";; _dorecursion() Confused name server [",$self->answerfrom,"] thinks [$of] is closer than [$known_zone]?\n" if $self->{'debug'};
              last;
            }
          } else {
            print ";; _dorecursion() Ignoring NON NS entry found in authority section: ",$rr->string,"\n" if $self->{'debug'};
          }
        }
        foreach my $rr ($packet->additional) {
          if ($rr->type eq "CNAME") {
            # Store this CNAME into %auth too
            if (my $server = lc $rr->name) {
              $server =~ s/\.*$/./;
              if ($auth{$server}) {
                my $cname = lc $rr->rdatastr;
                $cname =~ s/\.*$/./;
                print ";; _dorecursion() FOUND CNAME authority: ",$rr->string,"\n" if $self->{'debug'};
                $auth{$cname} ||= [];
                $auth{$server} = $auth{$cname};
                next;
              }
            }
          } elsif ($rr->type eq "A") {
            if (my $server = lc $rr->name) {
              $server =~ s/\.*$/./;
              if ($auth{$server}) {
                print ";; _dorecursion() STORING: $server IN A ",$rr->rdatastr,"\n" if $self->{'debug'};
                push @{ $auth{$server} }, $rr->rdatastr;
                next;
              }
            }
          }
          print ";; _dorecursion() Ignoring useless: ",$rr->string,"\n" if $self->{'debug'};
        }
        if ($of =~ /$known_zone$/) {
          return $self->_dorecursion( $query_packet, $of, \%auth, $depth+1 );
        } else {
          return $self->_dorecursion( $query_packet, $known_zone, $known_authorities, $depth+1 );
        }
      }
    }
  }
  return undef;
}

1;

__END__


=head1 NAME

Net::DNS::Resolver::Recurse - Perform recursive dns lookups

=head1 SYNOPSIS

  use Net::DNS::Resolver::Recurse;
  my $res = Net::DNS::Resolver::Recurse->new;

=head1 DESCRIPTION

This module is a super class of Net::DNS::Resolver.
So the methods for Net::DNS::Resolver still work
for this module as well.  There are just a couple
methods added:

=head2 hints

Initialize the hint servers.  Recursive queries
need a starting name server to work off of.
This method takes a list of IP addresses to
use as the starting servers.  These name servers
should be authoritative for the root (.) zone.

  $res->hints( @ips );

If no hints are passed, the default nameserver
is asked for the hints.  Normally these IPs can
be obtained from the following location:

  ftp://ftp.internic.net/domain/named.root

=head2 query_dorecursion

This method is much like the normal query() method
except it disables the recurse flag in the packet
and explicitly performs the recursion.

  $packet = $res->query_dorecursion( "www.netscape.com.", "A");

=head1 AUTHOR

Rob Brown, bbb@cpan.org

=head1 SEE ALSO

L<Net::DNS::Resolver>,

=head1 COPYRIGHT

Copyright (c) 2002, Rob Brown.  All rights reserved.

This module is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.

$Id: Recurse.pm,v 1.3 2003/05/22 06:19:49 ctriv Exp $

=cut

Example lookup process:

[root@box root]# dig +trace www.rob.com.au.

; <<>> DiG 9.2.0 <<>> +trace www.rob.com.au.
;; global options:  printcmd
.                       507343  IN      NS      C.ROOT-SERVERS.NET.
.                       507343  IN      NS      D.ROOT-SERVERS.NET.
.                       507343  IN      NS      E.ROOT-SERVERS.NET.
.                       507343  IN      NS      F.ROOT-SERVERS.NET.
.                       507343  IN      NS      G.ROOT-SERVERS.NET.
.                       507343  IN      NS      H.ROOT-SERVERS.NET.
.                       507343  IN      NS      I.ROOT-SERVERS.NET.
.                       507343  IN      NS      J.ROOT-SERVERS.NET.
.                       507343  IN      NS      K.ROOT-SERVERS.NET.
.                       507343  IN      NS      L.ROOT-SERVERS.NET.
.                       507343  IN      NS      M.ROOT-SERVERS.NET.
.                       507343  IN      NS      A.ROOT-SERVERS.NET.
.                       507343  IN      NS      B.ROOT-SERVERS.NET.
;; Received 436 bytes from 127.0.0.1#53(127.0.0.1) in 9 ms
  ;;; But these should be hard coded as the hints

  ;;; Ask H.ROOT-SERVERS.NET gave:
au.                     172800  IN      NS      NS2.BERKELEY.EDU.
au.                     172800  IN      NS      NS1.BERKELEY.EDU.
au.                     172800  IN      NS      NS.UU.NET.
au.                     172800  IN      NS      BOX2.AUNIC.NET.
au.                     172800  IN      NS      SEC1.APNIC.NET.
au.                     172800  IN      NS      SEC3.APNIC.NET.
;; Received 300 bytes from 128.63.2.53#53(H.ROOT-SERVERS.NET) in 322 ms
  ;;; A little closer than before

  ;;; Ask NS2.BERKELEY.EDU gave:
com.au.                 259200  IN      NS      ns4.ausregistry.net.
com.au.                 259200  IN      NS      dns1.telstra.net.
com.au.                 259200  IN      NS      au2ld.CSIRO.au.
com.au.                 259200  IN      NS      audns01.syd.optus.net.
com.au.                 259200  IN      NS      ns.ripe.net.
com.au.                 259200  IN      NS      ns1.ausregistry.net.
com.au.                 259200  IN      NS      ns2.ausregistry.net.
com.au.                 259200  IN      NS      ns3.ausregistry.net.
com.au.                 259200  IN      NS      ns3.melbourneit.com.
;; Received 387 bytes from 128.32.206.12#53(NS2.BERKELEY.EDU) in 10312 ms
  ;;; A little closer than before

  ;;; Ask ns4.ausregistry.net gave:
com.au.                 259200  IN      NS      ns1.ausregistry.net.
com.au.                 259200  IN      NS      ns2.ausregistry.net.
com.au.                 259200  IN      NS      ns3.ausregistry.net.
com.au.                 259200  IN      NS      ns4.ausregistry.net.
com.au.                 259200  IN      NS      ns3.melbourneit.com.
com.au.                 259200  IN      NS      dns1.telstra.net.
com.au.                 259200  IN      NS      au2ld.CSIRO.au.
com.au.                 259200  IN      NS      ns.ripe.net.
com.au.                 259200  IN      NS      audns01.syd.optus.net.
;; Received 259 bytes from 137.39.1.3#53(ns4.ausregistry.net) in 606 ms
  ;;; Uh... yeah... I already knew this
  ;;; from what NS2.BERKELEY.EDU told me.
  ;;; ns4.ausregistry.net must have brain damage

  ;;; Ask ns1.ausregistry.net gave:
rob.com.au.             86400   IN      NS      sy-dns02.tmns.net.au.
rob.com.au.             86400   IN      NS      sy-dns01.tmns.net.au.
;; Received 87 bytes from 203.18.56.41#53(ns1.ausregistry.net) in 372 ms
  ;;; Ah, much better.  Something more useful.

  ;;; Ask sy-dns02.tmns.net.au gave:
www.rob.com.au.         7200    IN      A       139.134.5.123
rob.com.au.             7200    IN      NS      sy-dns01.tmns.net.au.
rob.com.au.             7200    IN      NS      sy-dns02.tmns.net.au.
;; Received 135 bytes from 139.134.2.18#53(sy-dns02.tmns.net.au) in 525 ms
  ;;; FINALLY, THE ANSWER!

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青草原综合久久大伊人精品 | 国产精品久久网站| 免费观看在线综合| 精品剧情在线观看| 国产在线精品视频| 国产欧美日韩另类一区| 99久久精品国产毛片| 亚洲精品欧美专区| 欧美电影一区二区| 黄页网站大全一区二区| 国产美女主播视频一区| 久久一区二区三区国产精品| 顶级嫩模精品视频在线看| 国产精品乱码一区二三区小蝌蚪| 色婷婷久久久亚洲一区二区三区| 偷窥国产亚洲免费视频| 精品久久久久久久久久久久久久久| 亚洲色图欧美在线| 欧美一区二区三级| 大胆欧美人体老妇| 亚洲国产综合在线| 欧美一区二区三区四区在线观看| 国产自产2019最新不卡| 亚洲品质自拍视频| 日韩午夜激情视频| 成人精品国产福利| 热久久久久久久| 国产精品午夜久久| 91精品国产一区二区三区 | 亚洲另类中文字| 91麻豆精品国产无毒不卡在线观看| 国产一区二区三区免费| 亚洲美女一区二区三区| 精品国产免费人成电影在线观看四季| 国产伦理精品不卡| 午夜精品久久久| 国产欧美一区二区精品忘忧草| 欧美日韩一区二区三区在线看| 粉嫩av一区二区三区粉嫩| 天涯成人国产亚洲精品一区av| 国产精品久久久久久久久免费丝袜 | 99久久777色| 国产在线精品免费| 亚洲电影欧美电影有声小说| 久久久精品欧美丰满| 欧美日韩免费观看一区三区| 福利一区福利二区| 久久精品99久久久| 亚洲综合成人在线| 国产精品卡一卡二卡三| 2023国产一二三区日本精品2022| 欧美日韩一区二区三区不卡| 99久久精品久久久久久清纯| 国产精品亚洲视频| 激情深爱一区二区| 日韩影院精彩在线| 亚洲成人精品在线观看| 亚洲欧美激情一区二区| 中文字幕 久热精品 视频在线| 欧美电影免费观看高清完整版在| 欧美日韩一区在线观看| 在线欧美一区二区| 日本精品视频一区二区| 91啪亚洲精品| eeuss国产一区二区三区| 国产成人在线观看免费网站| 极品瑜伽女神91| 美女性感视频久久| 日本系列欧美系列| 日韩精品亚洲一区二区三区免费| 亚洲一区二区在线免费观看视频| 一区二区三区四区乱视频| 亚洲欧洲日产国产综合网| 欧美韩国日本综合| 国产精品久久午夜| 国产精品久久网站| **网站欧美大片在线观看| 亚洲日穴在线视频| 亚洲色图欧洲色图| 亚洲在线视频一区| 日韩国产精品久久| 精品一区二区三区在线视频| 精品在线播放午夜| 成人永久aaa| 一本久道久久综合中文字幕| 在线视频你懂得一区二区三区| 欧美性高清videossexo| 欧美精品色综合| 日韩欧美中文字幕一区| 久久精品欧美日韩| 日韩一区在线看| 亚洲一区二区三区在线| 青青草成人在线观看| 国产一区二区不卡| 99久久综合国产精品| 欧洲精品在线观看| 91精品国产高清一区二区三区| 日韩欧美在线网站| 日本一区二区三区高清不卡| 亚洲欧美电影一区二区| 天天综合色天天综合| 国产综合成人久久大片91| 成人性生交大片免费看中文网站| 色偷偷一区二区三区| 91麻豆精品国产91久久久 | 成人av在线播放网站| 91精彩视频在线观看| 欧美一区二区三区免费观看视频| 久久综合色之久久综合| 亚洲免费av高清| 久久99精品国产.久久久久久| 成人av免费在线播放| 国产亚洲制服色| 亚洲色图都市小说| 蜜臀av一区二区三区| 懂色av中文一区二区三区| 日本韩国欧美在线| 久久亚洲精品国产精品紫薇| 亚洲免费av在线| 国产一区欧美日韩| 欧美视频一区二区三区在线观看| www国产成人| 亚洲成av人综合在线观看| 国产精品一区二区三区四区| 欧美日韩黄色一区二区| 国产日韩精品视频一区| 亚洲成av人片在线观看无码| 国产成a人亚洲精| 欧美一区二区三区啪啪| 亚洲乱码国产乱码精品精98午夜| 韩国欧美国产一区| 欧美日韩视频专区在线播放| 国产精品视频一二| 麻豆91在线看| 欧美在线视频不卡| 中文字幕国产一区二区| 看电视剧不卡顿的网站| 欧美色窝79yyyycom| 国产精品久久久久久久蜜臀| 久久99精品国产麻豆婷婷洗澡| 欧美午夜片在线观看| 中文字幕在线免费不卡| 国产在线精品不卡| 日韩一区二区电影在线| 亚洲午夜激情av| 91免费看`日韩一区二区| 中文字幕欧美区| 国产伦精品一区二区三区视频青涩| 欧美性猛片aaaaaaa做受| 亚洲三级免费电影| 99久久久久久| 国产精品久久二区二区| 国产成人av一区二区三区在线 | 国产成人午夜精品影院观看视频 | 国产一区二区三区四| 欧美一级黄色大片| 日韩国产一二三区| 91精品国产综合久久福利软件| 亚洲第一福利一区| 日本道色综合久久| 亚洲自拍偷拍麻豆| 欧美影视一区在线| 一区二区三区蜜桃网| 欧美性感一类影片在线播放| 亚洲综合色自拍一区| 欧美性高清videossexo| 亚洲国产成人av网| 欧美精品在欧美一区二区少妇| 亚洲成人资源在线| 7777精品伊人久久久大香线蕉经典版下载| 亚洲图片欧美色图| 欧美一区二区福利在线| 免费成人美女在线观看.| 日韩午夜在线观看视频| 精品一区二区三区在线观看国产| wwwwww.欧美系列| 成人午夜视频在线| 亚洲人成伊人成综合网小说| 欧洲一区二区av| 日韩高清不卡一区二区| 欧美一区日韩一区| 久久成人久久鬼色| 国产精品视频第一区| 色哦色哦哦色天天综合| 日韩激情视频在线观看| 精品国产免费一区二区三区四区| 国产a视频精品免费观看| 亚洲天堂福利av| 欧美日本不卡视频| 国产老妇另类xxxxx| 中文字幕一区二区三区在线观看| 在线观看视频一区二区| 日日摸夜夜添夜夜添亚洲女人| 2023国产精品自拍| 精品嫩草影院久久| 成人av片在线观看| 图片区小说区国产精品视频| 久久亚洲欧美国产精品乐播| 一本色道久久加勒比精品| 免费观看久久久4p|