%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,mail,shell_exec,system,proc_open,popen,ini_alter,dl,proc_close,curl_exec,curl_multi_exec,readfile,parse_ini_file,escapeshellarg,escapeshellcmd,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,mail,php_uname,phpinfo MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/apache/ |
Upload File : |
# mod_access.pl # Defines editors for host restriction directives sub mod_access_directives { local($rv); $rv = [ [ 'allow deny order', 1, 4, 'directory htaccess' ] ]; return &make_directives($rv, $_[0], "mod_access"); } sub edit_allow_deny_order { local($d, @w, $i, @type, @mode, @what, $rv); foreach $d (@{$_[0]}, @{$_[1]}) { @w = split(/\s+/, $d->{'value'}); for($i=1; $i<@w; $i++) { push(@type, lc($d->{'name'}) eq "allow" ? 1 : 2); push(@what, $w[$i]); if ($w[$i] =~ /^env=(\S+)$/) { $what[$#what] = $1; push(@mode, 6); } elsif ($w[$i] =~ /^[0-9\.]+\/[0-9]+$/) { push(@mode, 5); } elsif ($w[$i] =~ /^[0-9\.]+\/[0-9\.]+$/) { push(@mode, 4); } elsif ($w[$i] =~ /^\d+\.\d+\.\d+\.\d+$/) { push(@mode, 2); } elsif ($w[$i] =~ /^[0-9\.]+$/) { push(@mode, 3); } elsif ($w[$i] eq "all") { push(@mode, 0); } else { push(@mode, 1); } } } push(@type, ""); push(@what, ""); push(@mode, 0); $rv = "<i>$text{'mod_access_order'}</i>\n". &choice_input($_[2]->[0]->{'value'}, "order", "", "$text{'mod_access_denyallow'},deny,allow", "$text{'mod_access_allowdeny'},allow,deny", "$text{'mod_access_mutual'},mutual-failure", "$text{'mod_access_default'},")."<br>\n"; $rv .= "<table border>\n". "<tr $tb> <td><b>$text{'mod_access_action'}</b></td> <td><b>$text{'mod_access_cond'}</b></td> </tr>\n"; @sels = ("$text{'mod_access_all'},0", "$text{'mod_access_host'},1", "$text{'mod_access_ip'},2", "$text{'mod_access_pip'},3"); if ($_[3]->{'version'} >= 1.3) { push(@sels, "$text{'mod_access_mask'},4", "$text{'mod_access_cidr'},5"); } if ($_[3]->{'version'} >= 1.2) { push(@sels, "$text{'mod_access_var'},6"); } for($i=0; $i<@type; $i++) { $rv .= "<tr $cb> <td>".&select_input($type[$i], "allow_type_$i", "", ",0", "$text{'mod_access_allow'},1", "$text{'mod_access_deny'},2")."</td>\n"; $rv .= "<td>".&select_input($mode[$i], "allow_mode_$i", "0", @sels); $rv .= sprintf "<input name=allow_what_$i size=20 value=\"%s\"></td>\n", $mode[$i] ? $what[$i] : ""; $rv .= "</tr>\n"; } $rv .= "</table>\n"; return (2, "$text{'mod_access_restr'}", $rv); } sub save_allow_deny_order { local($i, $type, $mode, $what, @allow, @deny); for($i=0; defined($type = $in{"allow_type_$i"}); $i++) { $mode = $in{"allow_mode_$i"}; $what = $in{"allow_what_$i"}; if (!$type) { next; } if ($mode == 0) { $what = "all"; } elsif ($mode == 2 && !&check_ipaddress($what) && !&check_ip6address($what)) { &error(&text('mod_access_eip', $what)); } elsif ($mode == 3 && $what !~ /^[0-9\.]+$/) { &error(&text('mod_access_epip', $what)); } elsif ($mode == 4 && ($what !~ /^([0-9\.:]+)\/([0-9\.:]+)$/ || (!&check_ipaddress($1) && !&check_ip6address($1)) || (!&check_ipaddress($2) && !&check_ip6address($2)))) { &error(&text('mod_access_emask', $what)); } elsif ($mode == 5 && ($what !~ /^([0-9\.:]+)\/([0-9]+)$/ || !&check_ipaddress($1) || $2 > 32)) { &error(&text('mod_access_ecidr', $what)); } elsif ($mode == 6) { $what =~ /^\S+$/ || &error(&text('mod_access_evar', $what)); $what = "env=$what"; } if ($type == 1) { push(@allow, "from $what"); } else { push(@deny, "from $what"); } } return ( \@allow, \@deny, &parse_choice("order", "")); } 1;