X7ROOT File Manager
Current Path:
/usr/libexec/webmin/tcpwrappers
usr
/
libexec
/
webmin
/
tcpwrappers
/
📁
..
📄
CHANGELOG
(266 B)
📄
backup_config.pl
(613 B)
📄
cgi_args.pl
(357 B)
📄
config
(73 B)
📄
config.info
(138 B)
📄
config.info.ca
(179 B)
📄
config.info.de
(141 B)
📄
config.info.fr
(174 B)
📄
config.info.hu
(0 B)
📄
config.info.ms
(153 B)
📄
config.info.nl
(93 B)
📄
config.info.no
(133 B)
📄
config.info.pl
(141 B)
📄
delete_rules.cgi
(541 B)
📄
edit_rule.cgi
(3.35 KB)
📁
help
📁
images
📄
index.cgi
(1.44 KB)
📁
lang
📄
module.info
(144 B)
📄
module.info.af
(0 B)
📄
module.info.af.auto
(106 B)
📄
module.info.ar
(0 B)
📄
module.info.ar.auto
(139 B)
📄
module.info.be
(0 B)
📄
module.info.be.auto
(167 B)
📄
module.info.bg
(0 B)
📄
module.info.bg.auto
(179 B)
📄
module.info.ca
(104 B)
📄
module.info.ca.auto
(20 B)
📄
module.info.cs
(0 B)
📄
module.info.cs.auto
(113 B)
📄
module.info.da
(0 B)
📄
module.info.da.auto
(113 B)
📄
module.info.de
(96 B)
📄
module.info.de.auto
(20 B)
📄
module.info.el
(0 B)
📄
module.info.el.auto
(163 B)
📄
module.info.es
(0 B)
📄
module.info.es.auto
(125 B)
📄
module.info.eu
(0 B)
📄
module.info.eu.auto
(115 B)
📄
module.info.fa
(0 B)
📄
module.info.fa.auto
(173 B)
📄
module.info.fi
(0 B)
📄
module.info.fi.auto
(110 B)
📄
module.info.fr
(0 B)
📄
module.info.fr.auto
(124 B)
📄
module.info.he
(0 B)
📄
module.info.he.auto
(150 B)
📄
module.info.hr
(0 B)
📄
module.info.hr.auto
(123 B)
📄
module.info.hu
(96 B)
📄
module.info.hu.auto
(21 B)
📄
module.info.it
(0 B)
📄
module.info.it.auto
(121 B)
📄
module.info.ja
(0 B)
📄
module.info.ja.auto
(135 B)
📄
module.info.ko
(0 B)
📄
module.info.ko.auto
(106 B)
📄
module.info.lt
(0 B)
📄
module.info.lt.auto
(126 B)
📄
module.info.lv
(0 B)
📄
module.info.lv.auto
(122 B)
📄
module.info.ms
(95 B)
📄
module.info.ms.auto
(20 B)
📄
module.info.mt
(0 B)
📄
module.info.mt.auto
(137 B)
📄
module.info.nl
(21 B)
📄
module.info.nl.auto
(101 B)
📄
module.info.no
(21 B)
📄
module.info.no.auto
(92 B)
📄
module.info.pl
(94 B)
📄
module.info.pl.auto
(20 B)
📄
module.info.pt
(0 B)
📄
module.info.pt.auto
(123 B)
📄
module.info.pt_BR
(0 B)
📄
module.info.pt_BR.auto
(132 B)
📄
module.info.ro
(0 B)
📄
module.info.ro.auto
(124 B)
📄
module.info.ru
(0 B)
📄
module.info.ru.auto
(167 B)
📄
module.info.sk
(0 B)
📄
module.info.sk.auto
(111 B)
📄
module.info.sl
(0 B)
📄
module.info.sl.auto
(124 B)
📄
module.info.sv
(0 B)
📄
module.info.sv.auto
(107 B)
📄
module.info.th
(0 B)
📄
module.info.th.auto
(178 B)
📄
module.info.tr
(0 B)
📄
module.info.tr.auto
(138 B)
📄
module.info.uk
(0 B)
📄
module.info.uk.auto
(174 B)
📄
module.info.ur
(0 B)
📄
module.info.ur.auto
(172 B)
📄
module.info.vi
(0 B)
📄
module.info.vi.auto
(133 B)
📄
module.info.zh
(0 B)
📄
module.info.zh.auto
(93 B)
📄
module.info.zh_TW
(0 B)
📄
module.info.zh_TW.auto
(102 B)
📄
save_rule.cgi
(2.31 KB)
📄
tcpwrappers-lib.pl
(3.2 KB)
Editing: save_rule.cgi
#!/usr/bin/perl # Create, update or delete a rule require './tcpwrappers-lib.pl'; &ReadParse(); &error_setup($text{'save_errtitle'}); $type = $in{'allow'} ? 'allow' : 'deny'; $file = $config{'hosts_'.$type}; @rules = &list_rules($file); if (!$in{'new'}) { ($rule) = grep { $_->{'id'} == $in{'id'} } @rules; $rule || &error($text{'edit_eid'}); } &lock_file($file); if ($in{'delete'}) { # Delete one rule &delete_rule($file, $rule); goto ALLDONE; } else { # Check input &error($text{'save_eservice'}) if ($in{'service_custom'} && $in{'service_custom'} !~ /^[\w\d\s\-\/\.,]+$/); &error($text{'save_eservice'}) if ($in{'service_except_custom'} && $in{'service_except_custom'} !~ /^[\w\d\s\-\/\.,]+$/); &error($text{'save_ehost'}) if ($in{'host_text_def'} == 0 && $in{'host_text'} !~ /^[\w\d\s\-\/\@\.,]+$/ && $in{'host_text'} !~ /^\[[:\da-f]+\]/i); &error($text{'save_ehost'}) if ($in{'host_except'} && $in{'host_except'} !~ /^[\w\d\s\-\/\@\.,]+$/ && $in{'host_except'} !~ /^\[[:\da-f]+\]/i); for (my $i = 0; $i <= $in{'cmd_count'}; $i++) { &error($text{'save_ecmd'}) if ($in{'cmd_'.$i} && $in{'cmd_'.$i} !~ /^[\w\d\s\-\/\@\%\|\(\)\'\"\&\.,]+$/); } } # Build rule record if ($in{'service_custom'}) { $service = $in{'service_custom'}; if ($in{'service_except_custom'}) { $service .= " EXCEPT ".$in{'service_except_custom'}; } } else { # listed from (x)inetd $service = join(",", split /\0/, $in{'service'}); if ($in{'service_except'}) { $service .= " EXCEPT ".join(",", split /\0/, $in{'service_except'}); } } $host = $in{'host_text_def'} ? $in{'host_select'} : $in{'host_text'}; if ($in{'host_except'}) { $host .= " EXCEPT ".$in{'host_except'}; } $cmd = ''; for (my $i = 0; $i <= $in{'cmd_count'}; $i++) { next unless ($in{'cmd_'.$i}); $cmd .= $cmd ? " : " : ''; $cmd .= $in{'cmd_directive_'.$i} ne 'none' ? $in{'cmd_directive_'.$i}.' ' : ''; $cmd .= $in{'cmd_'.$i}; } my %newrule = ( 'service' => $service, 'host' => $host, 'cmd' => $cmd ); # Save to file if ($in{'new'}) { &create_rule($file, \%newrule); } else { &modify_rule($file, $rule, \%newrule); } ALLDONE: &unlock_file($file); &webmin_log($in{'new'} ? "create" : $in{'delete'} ? "delete" : "modify", "rule", $rule->{'id'}); &redirect("index.cgi?type=$type");
Upload File
Create Folder