.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Zonemaster 3pm" .TH Zonemaster 3pm "2021-01-06" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Zonemaster \- A tool to check the quality of a DNS zone .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& my @results = Zonemaster\->test_zone(\*(Aqiis.se\*(Aq) .Ve .SH "INTRODUCTION" .IX Header "INTRODUCTION" This manual describes the main Zonemaster module. If what you're after is documentation on the Zonemaster test engine as a whole, see Zonemaster::Overview. .SH "METHODS" .IX Header "METHODS" .IP "test_zone($name)" 4 .IX Item "test_zone($name)" Runs all available tests and returns a list of Zonemaster::Logger::Entry objects. .ie n .IP "test_module($module, $name)" 4 .el .IP "test_module($module, \f(CW$name\fR)" 4 .IX Item "test_module($module, $name)" Runs all available tests for the zone with the given name in the specified module. .ie n .IP "test_method($module, $method, @arguments)" 4 .el .IP "test_method($module, \f(CW$method\fR, \f(CW@arguments\fR)" 4 .IX Item "test_method($module, $method, @arguments)" Run one particular test method in one particular module. The requested module must be in the list of active loaded modules (that is, not the Basic module and not a module disabled by the current policy), and the method must be listed in the metadata the module exports. If those requirements are fulfilled, the method will be called with the provided arguments. .IP "zone($name)" 4 .IX Item "zone($name)" Returns a Zonemaster::Zone object for the given name. .ie n .IP "ns($name, $address)" 4 .el .IP "ns($name, \f(CW$address\fR)" 4 .IX Item "ns($name, $address)" Returns a Zonemaster::Nameserver object for the given name and address. .IP "\fBconfig()\fR" 4 .IX Item "config()" Returns the global Zonemaster::Config object. .IP "\fBlogger()\fR" 4 .IX Item "logger()" Returns the global Zonemaster::Logger object. .IP "\fBall_tags()\fR" 4 .IX Item "all_tags()" Returns a list of all the tags that can be logged for all available test modules. .IP "\fBall_methods()\fR" 4 .IX Item "all_methods()" Returns a hash, where the keys are test module names and the values are lists with the names of the test methods in that module. .ie n .IP "recurse($name, $type, $class)" 4 .el .IP "recurse($name, \f(CW$type\fR, \f(CW$class\fR)" 4 .IX Item "recurse($name, $type, $class)" Does a recursive lookup for the given name, type and class, and returns the resulting packet (if any). Simply calls \&\*(L"recurse\*(R" in Zonemaster::Recursor on a globally stored object. .IP "save_cache($filename)" 4 .IX Item "save_cache($filename)" After running the tests, save the accumulated cache to a file with the given name. .IP "preload_cache($filename)" 4 .IX Item "preload_cache($filename)" Before running the tests, load the cache with information from a file with the given name. This file must have the same format as is produced by \&\*(L"\fBsave_cache()\fR\*(R". .IP "asn_lookup($ip)" 4 .IX Item "asn_lookup($ip)" Takes a single \s-1IP\s0 address and returns one of three things: .RS 4 .IP "\(bu" 4 Nothing, if the \s-1IP\s0 address is not in any \s-1AS.\s0 .IP "\(bu" 4 If called in list context, a list of \s-1AS\s0 number and a Net::IP::XS object representing the prefix it's in. .IP "\(bu" 4 If called in scalar context, only the \s-1AS\s0 number. .RE .RS 4 .RE .IP "\fBmodules()\fR" 4 .IX Item "modules()" Returns a list of the loaded test modules. Exactly the same as \*(L"modules\*(R" in Zonemaster::Test. .ie n .IP "add_fake_delegation($domain, $data)" 4 .el .IP "add_fake_delegation($domain, \f(CW$data\fR)" 4 .IX Item "add_fake_delegation($domain, $data)" This method adds some fake delegation information to the system. The arguments are a domain name, and a reference to a hash with delegation information. The keys in the hash must be nameserver names, and the values references to lists of \s-1IP\s0 addresses for the corresponding nameserver. .Sp Example: .Sp .Vb 7 \& Zonemaster\->add_fake_delegation( \& \*(Aqlysator.liu.se\*(Aq => { \& \*(Aqns.nic.se\*(Aq => [ \*(Aq212.247.7.228\*(Aq, \*(Aq2a00:801:f0:53::53\*(Aq ], \& \*(Aqi.ns.se\*(Aq => [ \*(Aq194.146.106.22\*(Aq, \*(Aq2001:67c:1010:5::53\*(Aq ], \& \*(Aqns3.nic.se\*(Aq => [ \*(Aq212.247.8.152\*(Aq, \*(Aq2a00:801:f0:211::152\*(Aq ] \& } \& ); .Ve .ie n .IP "add_fake_ds($domain, $data)" 4 .el .IP "add_fake_ds($domain, \f(CW$data\fR)" 4 .IX Item "add_fake_ds($domain, $data)" This method adds fake \s-1DS\s0 records to the system. The arguments are a domain name, and a reference to a list of references to hashes. The hashes in turn must have the keys \f(CW\*(C`keytag\*(C'\fR, \f(CW\*(C`algorithm\*(C'\fR, \f(CW\*(C`type\*(C'\fR and \f(CW\*(C`digest\*(C'\fR, with the values holding the corresponding data. The digest data should be a single unbroken string of hexadecimal digits. .Sp Example: .Sp .Vb 6 \& Zonemaster\->add_fake_ds( \& \*(Aqnic.se\*(Aq => [ \& { keytag => 16696, algorithm => 5, type => 2, digest => \*(Aq40079DDF8D09E7F10BB248A69B6630478A28EF969DDE399F95BC3B39F8CBACD7\*(Aq }, \& { keytag => 16696, algorithm => 5, type => 1, digest => \*(AqEF5D421412A5EAF1230071AFFD4F585E3B2B1A60\*(Aq }, \& ] \& ); .Ve .IP "\fBstart_time_now()\fR" 4 .IX Item "start_time_now()" Set the logger's start time to the current time. .IP "\fBreset()\fR" 4 .IX Item "reset()" Reset logger start time to current time, empty the list of log messages, clear nameserver object cache and recursor cache. .SH "AUTHOR" .IX Header "AUTHOR" Calle Dybedahl, \f(CW\*(C`\*(C'\fR