Server IP : 104.21.38.3 / Your IP : 172.71.82.37 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/libnet-dns-perl/examples/contrib/ |
Upload File : |
#!/usr/bin/perl use strict; use warnings; my $VERSION = (qw$LastChangedRevision: 1811 $)[1] || 0.01; =head1 NAME find_zonecut - Find zonecut for a domain name =head1 SYNOPSIS find_zonecut name =head1 DESCRIPTION B<find_zonecut> returns the name of the closest delegation point to the specified domain name. =cut use Net::DNS; my $resolver = Net::DNS::Resolver->new(); print find_zonecut(shift), "\n"; sub find_zonecut { ## Copyright (c)2014 Dick Franks my $name = shift; my $reply = $resolver->send( "*.$name", 'NULL' ) || die $resolver->errorstring; my ($cut) = map { $_->name } $reply->authority; return $cut || die "failed to find zone cut for $name"; } __END__ =head1 COPYRIGHT (c)2014 Dick Franks E<lt>rwfranks[...]acm.orgE<gt> All rights reserved. FOR DEMONSTRATION PURPOSES ONLY, NO WARRANTY, NO SUPPORT =head1 SEE ALSO L<perl>, L<Net::DNS> =cut