X7ROOT File Manager
Current Path:
/usr/libexec/webmin/net
usr
/
libexec
/
webmin
/
net
/
📁
..
📄
CHANGELOG
(5.55 KB)
📄
acl_security.pl
(3.08 KB)
📄
apply.cgi
(184 B)
📄
backup_config.pl
(1005 B)
📄
cgi_args.pl
(752 B)
📄
cobalt-linux-lib.pl
(32.83 KB)
📄
coherent-linux-lib.pl
(32.83 KB)
📄
config
(48 B)
📄
config-ALL-linux
(48 B)
📄
config-cygwin
(82 B)
📄
config-freebsd
(48 B)
📄
config-macos
(48 B)
📄
config-netbsd
(48 B)
📄
config-openbsd
(48 B)
📄
config-solaris
(79 B)
📄
config-syno-linux
(48 B)
📄
config-unixware
(48 B)
📄
config-windows
(78 B)
📄
config.info
(193 B)
📄
config.info.ca
(241 B)
📄
config.info.cs
(205 B)
📄
config.info.de
(219 B)
📄
config.info.es
(175 B)
📄
config.info.fa
(255 B)
📄
config.info.fr
(246 B)
📄
config.info.hu
(0 B)
📄
config.info.ja
(68 B)
📄
config.info.nl
(197 B)
📄
config.info.no
(208 B)
📄
config.info.pl
(240 B)
📄
config.info.pt_BR
(229 B)
📄
config.info.ru
(361 B)
📄
config.info.sk
(225 B)
📄
config.info.sv
(42 B)
📄
config.info.tr
(65 B)
📄
config.info.uk
(87 B)
📄
config.info.zh
(43 B)
📄
config.info.zh_TW
(44 B)
📄
create_route.cgi
(1004 B)
📄
cygwin-lib.pl
(11.28 KB)
📄
debian-linux-lib.pl
(32.63 KB)
📄
defaultacl
(114 B)
📄
delete_aifcs.cgi
(537 B)
📄
delete_bifcs.cgi
(1.44 KB)
📄
delete_hosts.cgi
(523 B)
📄
delete_ipnodes.cgi
(542 B)
📄
delete_routes.cgi
(458 B)
📄
edit_aifc.cgi
(5.09 KB)
📄
edit_bifc.cgi
(10.42 KB)
📄
edit_host.cgi
(1.13 KB)
📄
edit_ipnode.cgi
(1.04 KB)
📄
edit_range.cgi
(1.34 KB)
📄
freebsd-lib.pl
(19.22 KB)
📄
gentoo-linux-lib.pl
(8.47 KB)
📁
images
📄
index.cgi
(1.25 KB)
📄
interface_chooser.cgi
(3.8 KB)
📁
lang
📄
linux-lib.pl
(27.58 KB)
📄
list_dns.cgi
(2.3 KB)
📄
list_hosts.cgi
(1.36 KB)
📄
list_ifcs.cgi
(7.96 KB)
📄
list_ipnodes.cgi
(1.07 KB)
📄
list_routes.cgi
(3.38 KB)
📄
log_parser.pl
(1.24 KB)
📄
macos-lib.pl
(11.57 KB)
📄
mandrake-linux-lib.pl
(32.83 KB)
📄
mod_aifc.cgi
(720 B)
📄
module.info
(485 B)
📄
module.info.af
(0 B)
📄
module.info.af.auto
(123 B)
📄
module.info.ar
(0 B)
📄
module.info.ar.auto
(170 B)
📄
module.info.be
(0 B)
📄
module.info.be.auto
(226 B)
📄
module.info.bg
(0 B)
📄
module.info.bg.auto
(261 B)
📄
module.info.ca
(127 B)
📄
module.info.ca.auto
(25 B)
📄
module.info.cs
(27 B)
📄
module.info.cs.auto
(111 B)
📄
module.info.da
(0 B)
📄
module.info.da.auto
(129 B)
📄
module.info.de
(121 B)
📄
module.info.de.auto
(19 B)
📄
module.info.el
(0 B)
📄
module.info.el.auto
(229 B)
📄
module.info.es
(30 B)
📄
module.info.es.auto
(116 B)
📄
module.info.eu
(0 B)
📄
module.info.eu.auto
(142 B)
📄
module.info.fa
(0 B)
📄
module.info.fa.auto
(194 B)
📄
module.info.fi
(0 B)
📄
module.info.fi.auto
(145 B)
📄
module.info.fr
(30 B)
📄
module.info.fr.auto
(128 B)
📄
module.info.he
(0 B)
📄
module.info.he.auto
(161 B)
📄
module.info.hr
(0 B)
📄
module.info.hr.auto
(148 B)
📄
module.info.hu
(34 B)
📄
module.info.hu.auto
(148 B)
📄
module.info.it
(28 B)
📄
module.info.it.auto
(112 B)
📄
module.info.ja
(33 B)
📄
module.info.ja.auto
(153 B)
📄
module.info.ko
(28 B)
📄
module.info.ko.auto
(105 B)
📄
module.info.lt
(0 B)
📄
module.info.lt.auto
(157 B)
📄
module.info.lv
(0 B)
📄
module.info.lv.auto
(157 B)
📄
module.info.ms
(136 B)
📄
module.info.ms.auto
(18 B)
📄
module.info.mt
(0 B)
📄
module.info.mt.auto
(144 B)
📄
module.info.nl
(29 B)
📄
module.info.nl.auto
(105 B)
📄
module.info.no
(31 B)
📄
module.info.no.auto
(99 B)
📄
module.info.pl
(122 B)
📄
module.info.pl.auto
(19 B)
📄
module.info.pt
(31 B)
📄
module.info.pt.auto
(125 B)
📄
module.info.pt_BR
(34 B)
📄
module.info.pt_BR.auto
(131 B)
📄
module.info.ro
(0 B)
📄
module.info.ro.auto
(143 B)
📄
module.info.ru
(36 B)
📄
module.info.ru.auto
(167 B)
📄
module.info.sk
(28 B)
📄
module.info.sk.auto
(113 B)
📄
module.info.sl
(0 B)
📄
module.info.sl.auto
(140 B)
📄
module.info.sv
(31 B)
📄
module.info.sv.auto
(103 B)
📄
module.info.th
(0 B)
📄
module.info.th.auto
(327 B)
📄
module.info.tr
(30 B)
📄
module.info.tr.auto
(130 B)
📄
module.info.uk
(0 B)
📄
module.info.uk.auto
(223 B)
📄
module.info.ur
(0 B)
📄
module.info.ur.auto
(210 B)
📄
module.info.vi
(0 B)
📄
module.info.vi.auto
(170 B)
📄
module.info.zh
(21 B)
📄
module.info.zh.auto
(90 B)
📄
module.info.zh_TW
(24 B)
📄
module.info.zh_TW.auto
(96 B)
📄
msc-linux-lib.pl
(32.83 KB)
📄
net-lib.pl
(12 KB)
📄
netbsd-lib.pl
(19.22 KB)
📄
netplan-lib.pl
(20.85 KB)
📄
open-linux-lib.pl
(7.2 KB)
📄
openbsd-lib.pl
(12.6 KB)
📄
openmamba-linux-lib.pl
(32.83 KB)
📄
pardus-linux-lib.pl
(32.83 KB)
📄
rbac-mapping
(180 B)
📄
rc.inet1
(1.95 KB)
📄
redhat-linux-lib.pl
(32.83 KB)
📄
save_aifc.cgi
(5.78 KB)
📄
save_bifc.cgi
(10.12 KB)
📄
save_dns.cgi
(3.65 KB)
📄
save_host.cgi
(1.18 KB)
📄
save_ipnode.cgi
(1.26 KB)
📄
save_range.cgi
(1.42 KB)
📄
save_routes.cgi
(283 B)
📄
slackware-linux-9.1-ALL-lib.pl
(7.85 KB)
📄
slackware-linux-lib.pl
(6.71 KB)
📄
solaris-lib.pl
(20.79 KB)
📄
suse-linux-8.0-lib.pl
(7.31 KB)
📄
suse-linux-8.2-lib.pl
(7.31 KB)
📄
suse-linux-9.0-lib.pl
(8.74 KB)
📄
suse-linux-9.1-lib.pl
(8.74 KB)
📄
suse-linux-9.2-ALL-lib.pl
(11.23 KB)
📄
suse-linux-lib.pl
(9.08 KB)
📄
system_info.pl
(2.42 KB)
📄
trustix-linux-lib.pl
(32.83 KB)
📄
turbo-linux-lib.pl
(32.83 KB)
📄
united-linux-lib.pl
(7.31 KB)
📄
unixware-lib.pl
(9.9 KB)
📄
windows-lib.pl
(11.28 KB)
Editing: list_ifcs.cgi
#!/usr/bin/perl # list_ifcs.cgi # List active and boot-time interfaces require './net-lib.pl'; &ReadParse(); $access{'ifcs'} || &error($text{'ifcs_ecannot'}); $allow_add = &can_create_iface() && !$noos_support_add_ifcs; &ui_print_header(undef, $text{'ifcs_title'}, ""); # Get interfaces @act = &active_interfaces(1); @boot = &boot_interfaces(); @boot = sort iface_sort @boot; # Start tabs for active/boot time interfaces @tabs = ( [ "active", $text{'ifcs_now'}, "list_ifcs.cgi?mode=active" ] ); $defmode = "active"; if (!$access{'bootonly'}) { push(@tabs, [ "boot", $text{'ifcs_boot'}, "list_ifcs.cgi?mode=boot" ] ); $defmode = "boot"; } print &ui_tabs_start(\@tabs, "mode", $in{'mode'} || $defmode, 1); # Show interfaces that are currently active if (!$access{'bootonly'}) { # Table heading and links print &ui_tabs_start_tab("mode", "active"); print $text{'ifcs_activedesc'},"<p>\n"; local @tds; @links = ( ); if ($access{'ifcs'} >= 2) { print &ui_form_start("delete_aifcs.cgi", "post"); push(@links, &select_all_link("d"), &select_invert_link("d") ); } push(@tds, "width=5 valign=top"); push(@tds, "width=20% valign=top", "width=20% valign=top", "width=20% valign=top", "width=20% valign=top"); push(@tds, "width=20% valign=top") if (&supports_address6()); push(@tds, "width=5% valign=top"); if ($allow_add) { push(@links, &ui_link("edit_aifc.cgi?new=1",$text{'ifcs_add'})); } print &ui_links_row(\@links); print &ui_columns_start([ "", $text{'ifcs_name'}, $text{'ifcs_type'}, $text{'ifcs_ip'}, $text{'ifcs_mask'}, &supports_address6() ? ( $text{'ifcs_ip6'} ) : ( ), $text{'ifcs_status'} ], 100, 0, \@tds); # Show table of interfaces @act = sort iface_sort @act; foreach $a (@act) { next if ($access{'hide'} && # skip hidden (!$a->{'edit'} || !&can_iface($a))); local $mod = &module_for_interface($a); local %minfo = $mod ? &get_module_info($mod->{'module'}) : ( ); local @cols; if ($a->{'edit'} && &can_iface($a) && $a->{'address'}) { push(@cols, "<a href=\"edit_aifc.cgi?idx=$a->{'index'}\">". &html_escape($a->{'fullname'})."</a>"); } elsif (!$a->{'edit'} && $mod) { push(@cols, "<a href=\"mod_aifc.cgi?idx=$a->{'index'}\">". &html_escape($a->{'fullname'})."</a>"); } else { push(@cols, &html_escape($a->{'fullname'})); } if ($a->{'virtual'} ne "") { $cols[0] = " ".$cols[0]; } if (%minfo && $minfo{'dir'} eq 'virtual-server') { # Shorten name $minfo{'desc'} = $text{'index_vmin'}; } push(@cols, &iface_type($a->{'name'}). ($a->{'virtual'} eq "" || $mod ? "" : " ($text{'ifcs_virtual'})"). (%minfo ? " ($minfo{'desc'})" : ""). ($a->{'speed'} ? " ".$a->{'speed'} : "")); push(@cols, &html_escape($a->{'address'}) || $text{'ifcs_noaddress'}); push(@cols, &html_escape($a->{'netmask'}) || $text{'ifcs_nonetmask'}); if (&supports_address6()) { push(@cols, join("<br>\n", map { &html_escape($_) } @{$a->{'address6'}})); } push(@cols, $a->{'up'} ? $text{'ifcs_up'} : "<font color=#ff0000>$text{'ifcs_down'}</font>"); if ($a->{'edit'} && &can_iface($a)) { print &ui_checked_columns_row(\@cols, \@tds, "d", $a->{'fullname'}); } else { print &ui_columns_row([ "", @cols ], \@tds); } } print &ui_columns_end(); print &ui_links_row(\@links); if ($access{'ifcs'} >= 2) { print &ui_form_end([ [ "delete", $text{'index_delete1'} ] ]); } print &ui_tabs_end_tab(); } # Show interfaces that get activated at boot print &ui_tabs_start_tab("mode", "boot"); print $text{'ifcs_bootdesc'},"<p>\n"; print &ui_form_start("delete_bifcs.cgi", "post"); @links = ( &select_all_link("b", 1), &select_invert_link("b", 1) ); if ($allow_add) { push(@links, &ui_link("edit_bifc.cgi?new=1",$text{'ifcs_add'})); if (defined(&supports_bonding) && &supports_bonding()) { push(@links, &ui_link("edit_bifc.cgi?new=1&bond=1",$text{'bonding_add'})); } if (defined(&supports_vlans) && &supports_vlans()) { push(@links, &ui_link("edit_bifc.cgi?new=1&vlan=1",$text{'vlan_add'})); } } if ($allow_add && defined(&supports_bridges) && &supports_bridges()) { push(@links, &ui_link("edit_bifc.cgi?new=1&bridge=1",$text{'ifcs_badd'})); } if ($allow_add && defined(&supports_ranges) && &supports_ranges()) { push(@links, &ui_link("edit_range.cgi?new=1",$text{'ifcs_radd'})); } print &ui_links_row(\@links); @tds = ( "width=5 valign=top", "width=20% valign=top", "width=20% valign=top", "width=20% valign=top", "width=20% valign=top" ); push(@tds, "width=20% valign=top xxx") if (&supports_address6()); push(@tds, "width=5% valign=top"); print &ui_columns_start([ "", $text{'ifcs_name'}, $text{'ifcs_type'}, $text{'ifcs_ip'}, $text{'ifcs_mask'}, &supports_address6() ? ( $text{'ifcs_ip6'} ) : ( ), $text{'ifcs_act'} ], 100, 0, \@tds); foreach $a (@boot) { local $can = $a->{'edit'} && &can_iface($a); next if ($access{'hide'} && !$can); # skip hidden local @cols; local @mytds = @tds; if ($a->{'range'} ne "") { # A range of addresses local $rng = &text('ifcs_range', $a->{'range'}); if ($can && ($gconfig{'os_type'} eq 'debian-linux') && &has_command("")) { $link = "edit_bifc.cgi?idx=$a->{'index'}"; if(&iface_type($a->{'name'}) eq 'Bonded'){ $link = $link . "&bond=1"; } elsif (&iface_type($a->{'name'}) =~ /^(.*) (VLAN)$/) { $link = $link . "&vlan=1"; } push(@cols, "<a href='$link'" . &html_escape($a->{'fullname'})."</a>"); } elsif($can) { $link = "edit_bifc.cgi?idx=$a->{'index'}"; push(@cols, "<a href='$link'" . &html_escape($a->{'fullname'})."</a>"); } else { push(@cols, &html_escape($rng)); } push(@cols, &iface_type($a->{'name'})); push(@cols, "$a->{'start'} - $a->{'end'}"); if (&supports_address6()) { # IPv6 not possible for ranges push(@cols, ""); } splice(@mytds, 3, 2, "colspan=2 width=40% valign=top"); } else { # A normal single interface local $mod = &module_for_interface($a); local %minfo = $mod ? &get_module_info($mod->{'module'}) : ( ); if ($can) { $link = "edit_bifc.cgi?idx=$a->{'index'}"; if(&iface_type($a->{'name'}) eq 'Bonded'){ $link = $link . "&bond=1"; } elsif (&iface_type($a->{'name'}) =~ /^(.*) (VLAN)$/) { $link = $link . "&vlan=1"; } push(@cols, "<a href='$link'>" .&html_escape($a->{'fullname'})."</a>"); } else { push(@cols, &html_escape($a->{'fullname'})); } if ($a->{'virtual'} ne "") { $cols[0] = " ".$cols[0]; } if (%minfo && $minfo{'dir'} eq 'virtual-server') { # Shorten name $minfo{'desc'} = $text{'index_vmin'}; } push(@cols, &iface_type($a->{'name'}). ($a->{'virtual'} eq "" || $mod ? "" : " ($text{'ifcs_virtual'})"). (%minfo ? " ($minfo{'desc'})" : "")); push(@cols, $a->{'bootp'} ? $text{'ifcs_bootp'} : $a->{'dhcp'} ? $text{'ifcs_dhcp'} : $a->{'address'} ? &html_escape($a->{'address'}) : $text{'ifcs_noaddress'}); push(@cols, $a->{'bootp'} ? $text{'ifcs_bootp'} : $a->{'dhcp'} ? $text{'ifcs_dhcp'} : $a->{'netmask'} ? &html_escape($a->{'netmask'}) : $text{'ifcs_nonetmask'}); if (&supports_address6()) { push(@cols, $a->{'auto6'} ? $text{'ifcs_auto6'} : join("<br>\n", map { &html_escape($_) } @{$a->{'address6'}})); } } push(@cols, $a->{'up'} ? $text{'yes'} : $text{'no'}); if ($can) { print &ui_checked_columns_row(\@cols, \@mytds, "b", $a->{'fullname'}); } else { print &ui_columns_row([ "", @cols ], \@tds); } } print &ui_columns_end(); print &ui_links_row(\@links); if($access{"delete"}) { print &ui_form_end([ [ "delete", $text{'index_delete2'} ], [ "deleteapply", $text{'index_delete3'} ], undef, [ "apply", $text{'index_apply2'} ] ]); } else { print &ui_form_end([ [ "apply", $text{'index_apply2'} ] ]); } print &ui_tabs_end_tab(); print &ui_tabs_end(1); &ui_print_footer("", $text{'index_return'});
Upload File
Create Folder