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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? recurse.pm

?? 雷傲極酷超級(jí)論壇LeoBBSX 040408 簡(jiǎn)體正式版
?? PM
字號(hào):
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!

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久亚洲综合| 日韩精品中文字幕一区二区三区| 秋霞午夜鲁丝一区二区老狼| 国产精品私人影院| 欧美一区二区视频在线观看2020| 97se亚洲国产综合自在线观| 美女久久久精品| 亚洲国产综合人成综合网站| 国产精品久线在线观看| 精品国产乱码久久久久久图片| 欧美最猛性xxxxx直播| 不卡欧美aaaaa| 国产在线精品一区在线观看麻豆| 亚洲超碰精品一区二区| 亚洲视频一二三区| 国产日产精品一区| 精品国产露脸精彩对白 | 欧美日韩久久一区二区| 成人在线视频一区| 久久99精品久久久| 秋霞电影网一区二区| 亚洲成人你懂的| 亚洲精品免费播放| 亚洲嫩草精品久久| 最新热久久免费视频| 欧美激情中文不卡| 国产网站一区二区| 国产午夜亚洲精品羞羞网站| 久久综合网色—综合色88| 日韩欧美一二三区| 91精品国产综合久久精品| 欧美日韩免费一区二区三区| 欧美亚洲国产一区在线观看网站 | 国产成人精品午夜视频免费| 另类综合日韩欧美亚洲| 日韩经典中文字幕一区| 五月激情综合婷婷| 日韩精品一二三区| 日本视频中文字幕一区二区三区| 五月天丁香久久| 日韩av成人高清| 久久激五月天综合精品| 国产乱人伦偷精品视频不卡| 国产乱码精品1区2区3区| 国产成人精品影视| 精品国产伦一区二区三区观看方式| 制服丝袜激情欧洲亚洲| 日韩午夜中文字幕| 欧美精品一区二区三区蜜桃| 2021中文字幕一区亚洲| 欧美高清在线视频| 亚洲欧美日韩国产成人精品影院 | 国产精品一区一区| 国产aⅴ综合色| www.日韩在线| 色综合久久综合中文综合网| 欧美图区在线视频| 日韩区在线观看| 久久久久高清精品| 亚洲日本一区二区| 无吗不卡中文字幕| 国产麻豆成人精品| 99视频一区二区| 欧美日韩一区二区三区免费看 | 在线不卡的av| 精品999在线播放| 中文字幕高清一区| 亚洲成av人片在线观看无码| 精品一区二区三区日韩| 粉嫩aⅴ一区二区三区四区五区| 91免费小视频| 91麻豆精品国产自产在线观看一区| 久久先锋资源网| 亚洲欧美日韩综合aⅴ视频| 天堂蜜桃一区二区三区 | 波多野结衣精品在线| 欧美专区日韩专区| 久久久久国产精品人| 一区二区成人在线视频| 乱一区二区av| 91女神在线视频| 欧美成人一级视频| 一区二区三区四区中文字幕| 另类成人小视频在线| 91麻豆免费视频| www激情久久| 亚洲成人av一区二区| 成人一级黄色片| 欧美电影一区二区三区| 国产拍揄自揄精品视频麻豆| 亚洲国产精品久久久久秋霞影院| 国产在线精品国自产拍免费| 欧美午夜在线一二页| 精品国产髙清在线看国产毛片 | 国产中文一区二区三区| 色综合久久久网| 久久毛片高清国产| 日韩精品国产精品| 不卡影院免费观看| 午夜私人影院久久久久| 福利一区福利二区| 日韩视频在线一区二区| 亚洲一区二区三区爽爽爽爽爽| 国产精品亚洲专一区二区三区| 欧美色欧美亚洲另类二区| 中文字幕免费一区| 韩国精品免费视频| 欧美一级一级性生活免费录像| 亚洲欧美在线观看| 国产精选一区二区三区| 欧美一区二区三区四区在线观看| 亚洲色图另类专区| 国产传媒欧美日韩成人| 亚洲精品在线观看视频| 日韩成人免费看| 欧美天天综合网| 亚洲日本成人在线观看| 成人免费视频一区| 久久精品无码一区二区三区| 精品一区二区三区影院在线午夜| 91精品欧美久久久久久动漫| 亚洲一区二区3| 一本一道久久a久久精品综合蜜臀| 亚洲国产高清在线| 国产精品综合视频| 欧美激情一区三区| 国产成人在线影院| 久久久精品2019中文字幕之3| 久久99精品国产91久久来源 | 国产精品欧美极品| 成人av在线资源网| 一色桃子久久精品亚洲| 国产亚洲欧美色| 另类小说图片综合网| 日韩无一区二区| 美女mm1313爽爽久久久蜜臀| 精品日本一线二线三线不卡| 美腿丝袜亚洲色图| 日韩视频永久免费| 国产呦萝稀缺另类资源| 欧美www视频| 国产成人免费视频一区| 国产精品免费丝袜| 色综合夜色一区| 亚洲午夜精品一区二区三区他趣| 欧洲精品一区二区三区在线观看| 亚洲一区二区三区四区不卡| 欧美日韩高清一区二区不卡| 免费成人深夜小野草| 日韩精品中文字幕在线一区| 国产一区二区三区四区五区入口 | 久久久久国色av免费看影院| 国产成人精品网址| 亚洲精品视频免费观看| 欧美区视频在线观看| 乱一区二区av| 国产成人精品免费网站| 亚洲欧洲日产国产综合网| 欧美视频精品在线| 麻豆成人综合网| 日本一区二区成人在线| 91黄色免费观看| 毛片基地黄久久久久久天堂| 国产拍欧美日韩视频二区| 色综合久久中文字幕| 美女网站一区二区| 国产精品久久久久aaaa樱花| 欧美日韩性生活| 国产精品资源在线| 一区二区三区不卡视频| 精品国产一区二区三区忘忧草| 国产福利91精品一区二区三区| 一级精品视频在线观看宜春院| 欧美一级午夜免费电影| av一本久道久久综合久久鬼色| 午夜视频一区二区| 国产视频亚洲色图| 欧美男人的天堂一二区| 国产999精品久久久久久| 亚洲午夜久久久久久久久久久| 久久久高清一区二区三区| 欧美在线不卡视频| 国产一区二区三区av电影| 亚洲一区二区三区四区在线免费观看| 精品日韩欧美在线| 欧美日韩亚洲综合在线| 国产精品一区二区在线播放| 尤物视频一区二区| 国产喷白浆一区二区三区| 777精品伊人久久久久大香线蕉| 国产精品一区专区| 日韩精品亚洲一区二区三区免费| 中文字幕一区二区三区在线不卡| 欧美一区二区在线视频| 色婷婷综合久久久| 国产麻豆日韩欧美久久| 日本成人中文字幕| 亚洲一区二三区| 亚洲欧美偷拍卡通变态| 国产免费成人在线视频|