libwrap - Guardian Digital WebTool module interface to TCP Wrappers.
use libwrap; my $libwrap = new libwrap;
This Guardian Digital WebTool module provides an interface to manipulating TCP wrappers (/etc/hosts.allow and /etc/hosts.deny). This module allows you to add, delete, get, and list entries in the hosts.allow file.
This function is used to get service name based on the language selection, usually for display purpose on page. It receives two arguments one is WebTool::UI object and another is service name. It returns translated service name.
Example Usage:
$libwrap->resolve_service($page, 'pptpd')
This function is used to get information from configuration file(usually /etc/hosts.allow). It returns hash reference containing services as keys and allowed hosts as respective values (in terms of array reference).
Example Usage:
$allow = libwrap::allow_get();
foreach my $service (sort keys %{$allow}) {
my @hosts = @{$allow->{$service}};
...
}Ryan W. Maple <ryan@guardiandigital.com>
Copyright Guardian Digital, Inc., All Rights Reserved