⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 log_parser.pl

📁 BIND 9 dynamic DNS webmin module. This module supports both static and dynamic zones, and IPv4 and I
💻 PL
字号:
#! /usr/bin/perl##    B9DDNS - BIND 9 dynamic DNS webmin module.#    Copyright (C) 2003 John Horne. <john.horne@plymouth.ac.uk>#    Copyright (C) 2004 John Horne. <john.horne@plymouth.ac.uk>##    This program is free software; you can redistribute it and/or modify#    it under the terms of the GNU General Public License as published by#    the Free Software Foundation; either version 2 of the License, or#    (at your option) any later version.##    This program is distributed in the hope that it will be useful,#    but WITHOUT ANY WARRANTY; without even the implied warranty of#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the#    GNU General Public License for more details.##    You should have received a copy of the GNU General Public License#    along with this program; if not, write to the Free Software#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.### Functions for parsing this module's logs.#do 'b9ddns-lib.pl';use strict;no strict 'vars';## parse_webmin_log(user, script, action, type, object, &params)## Converts logged information from this module into human-readable form.#sub parse_webmin_log {	my ($user, $script, $action, $type, $object, $p) = @_;	my $formatted_obj = '<tt>' . $object . '</tt>';	if ($type eq 'record') {		if ($p->{'type'} eq 'PTR') {			return &text("log_${action}_record",				     $text{"type_$p->{'type'}"},				  '<tt>' . &arpa_to_ip($p->{'fqdn'}) . '</tt>',				  '<tt>' . &arpa_to_ip($object) . '</tt>');		}		else {			$p->{'fqdn'} =~ s/\.$object\.*$//i;			return &text("log_${action}_record",				     $text{"type_$p->{'type'}"},				     '<tt>' . $p->{'fqdn'} . '</tt>',				     $formatted_obj);		}	}	elsif ($action eq 'create') {		return &text("log_${type}", $formatted_obj);	}	elsif ($action eq 'delete') {		return &text("log_delete_${type}", $formatted_obj);	}	elsif ($action eq 'text') {		return &text('log_text', $formatted_obj);	}	elsif ($action eq 'soa') {		return &text('log_soa', $formatted_obj);	}	elsif ($action eq 'opts') {		return &text('log_opts', $formatted_obj);	}	elsif ($action eq 'view') {		return &text('log_review', $formatted_obj);	}	elsif ($action eq 'move') {		return &text('log_move', $formatted_obj);	}	elsif ($action eq 'rndc') {		return &text('log_rndc', $formatted_obj);	}	elsif ($text{"log_${action}"}) {		return $text{"log_${action}"};	}	else {		return undef;	}}1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -