Zonemaster(3pm)
β¨ Zonemaster β¨
okay bestie, buckle up π this is the manual page for the main Zonemaster module β like, the actual Perl module, Zonemaster(3pm), not the whole entire test engine. If you're here for the big-picture tea about the engine as a whole, you want Zonemaster::Overview instead. iykyk π«Ά
And what does this icon do? literally just this: a tool to check the quality of a DNS zone. that's it, that's the whole vibe check π¦
πΈ SYNOPSIS πΈ
one line, one dream:
my @results = Zonemaster->test_zone('iis.se')
π INTRODUCTION π
So this manual is all about the main Zonemaster module, periodt. If what you're actually craving is the documentation for the Zonemaster test engine as a whole, no worries, go read Zonemaster::Overview. this page is just the main module's moment π
π METHODS π
every single one, no skips, we're thorough in this house:
test_zone($name)β runs all the available tests and hands you back a list ofZonemaster::Logger::Entryobjects. the full send πtest_module($module, $name)β runs all the available tests for the zone with the given name, but only inside the module you specified.test_method($module, $method, @arguments)β runs exactly one particular test method in one particular module. the requested module has to be in the list of active loaded modules (so: not theBasicmodule, and not a module that's been disabled by the current policy, sorry bestie π), and the method has to be listed in the metadata that the module exports. if you tick both those boxes, the method gets called with the arguments you provided. slay.zone($name)β gives you back aZonemaster::Zoneobject for the given name. πΊοΈns($name, $address)β gives you back aZonemaster::Nameserverobject for the given name and address.config()β returns the globalZonemaster::Configobject.logger()β returns the globalZonemaster::Loggerobject.all_tags()β returns a list of all the tags that can be logged, across all available test modules. the whole tag collection, no cap π·οΈall_methods()β returns a hash where the keys are test module names and the values are lists holding the names of the test methods in that module.recurse($name, $type, $class)β does a recursive lookup for the given name, type and class, and returns the resulting packet (if there even is one). under the hood it simply calls"recurse" in Zonemaster::Recursoron a globally stored object. πsave_cache($filename)β after you've run the tests, save the accumulated cache to a file with the given name. πΎpreload_cache($filename)β before you run the tests, load the cache up with information from a file with the given name. heads up: this file has to have the same format as the one produced by"save_cache()".asn_lookup($ip)β takes a single IP address and returns one of three things:- Nothing at all, if the IP address isn't in any AS. π«₯
- If you call it in list context: a list of the AS number and a
Net::IP::XSobject representing the prefix it's in. - If you call it in scalar context: only the AS number.
modules()β returns a list of the loaded test modules. literally exactly the same as"modules" in Zonemaster::Test. πͺadd_fake_delegation($domain, $data)β this one adds some fake delegation information into the system. the arguments are a domain name, and a reference to a hash with delegation information. the keys in that hash must be nameserver names, and the values are references to lists of IP addresses for the corresponding nameserver.
Example:
Zonemaster->add_fake_delegation(
'lysator.liu.se' => {
'ns.nic.se' => [ '212.247.7.228', '2a00:801:f0:53::53' ],
'i.ns.se' => [ '194.146.106.22', '2001:67c:1010:5::53' ],
'ns3.nic.se' => [ '212.247.8.152', '2a00:801:f0:211::152' ]
}
);
add_fake_ds($domain, $data)β and this one adds fake DS records into the system. the arguments are a domain name, and a reference to a list of references to hashes. those hashes must have the keyskeytag,algorithm,typeanddigest, with the values holding the corresponding data. oh and the digest data should be a single unbroken string of hexadecimal digits β do not break it up, bestie π
Example:
Zonemaster->add_fake_ds(
'nic.se' => [
{ keytag => 16696, algorithm => 5, type => 2, digest => '40079DDF8D09E7F10BB248A69B6630478A28EF969DDE399F95BC3B39F8CBACD7' },
{ keytag => 16696, algorithm => 5, type => 1, digest => 'EF5D421412A5EAF1230071AFFD4F585E3B2B1A60' },
]
);
start_time_now()β sets the logger's start time to the current time. β°reset()β resets the logger start time to the current time, empties the list of log messages, and clears the nameserver object cache and the recursor cache. a full glow-up, everything fresh β¨π§Ό
π AUTHOR π
Calle Dybedahl, "<calle at init.se>" β the icon behind it all, we stan π
and that's the page, bestie!! π this was written for perl v5.32.0, dated 2021-01-06, and it's the Zonemaster(3pm) page from the User Contributed Perl Documentation. go forth and check some DNS zones, you absolute main character π¦π
π¦ where this page comes from
- ubuntu jammy: libzonemaster-perl 1.0.16-2.1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms