1#!/usr/bin/perl -l 2 3use DNSCheck; 4 5my $dc = DNSCheck->new; 6my $dns = $dc->dns; 7my $name = $ARGV[0]; 8 9if ($dc->host->host_syntax($name) == 0 and $dns->preflight_check($name)) { 10 print "TRUE"; 11} else { 12 print "FALSE"; 13} 14 15=head1 NAME 16 17dnscheck-preflight - quickly check if a name seems to be a delegated domain or not 18 19=head1 DESCRIPTION 20 21The dnscheck-preflight script takes a name and tries to figure out if that 22name corresponds to a delegated domain or not, without taking too much time 23about it (at least in theory, it should never use more than just over six 24seconds). 25 26There are no options. The script will print the string TRUE to standard output 27if it thinks the name is a delegated domain, and the string FALSE otherwise. 28 29A domain will be considered to exist if any of the following is true: 30 31=over 32 33=item 34 35An NS record can be found. 36 37=item 38 39A SOA record can be found. 40 41=item 42 43A query for either of the above gets a SERVFAIL response. 44 45=item 46 47A query for either of the above times out. 48 49=back 50 51=head1 EXAMPLE 52 53 dnscheck-preflight iis.se 54