Server IP : 195.201.23.43 / Your IP : 3.145.73.23 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : 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, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/net/ |
Upload File : |
do 'net-lib.pl'; sub list_system_info { my $can = &foreign_available($module_name) && $access{'sysinfo'}; if (!$can) { return (); } my @net = defined(&net::active_interfaces) ? net::active_interfaces() : (); my $desc = ucwords($text{'ifcs_title'}); my ($html, $html_start, $html_rows, $html_end); my ($is_speed, $is_ipv6); my $ipv6t = $text{'ifcs_ip6'}; my $open = 0; if (@net) { @net = sort iface_sort @net; &load_theme_library(); foreach $a (@net) { next if ($a->{'fullname'} eq 'lo'); my $name = &html_escape($a->{'fullname'}); if ($a->{'virtual'} ne "") { $name = " " . $name; } my $type = &net::iface_type($a->{'name'}); my $speed = $a->{'speed'}; $is_speed = 1 if ($speed); my $ip = &html_escape($a->{'address'}) || $text{'ifcs_noaddress'}; my $ipv6 = ''; if (&net::supports_address6()) { $ipv6 = join("<br>\n", map {&html_escape($_)} @{ $a->{'address6'} }); $is_ipv6 = 1 if ($ipv6); $ipv6t = $text{'ifcs_mode6'} if ($ipv6 =~ /<br>/); } my $mask = &html_escape($a->{'netmask'}) || $text{'ifcs_nonetmask'}; my $broad = &html_escape($a->{'broadcast'}) || ""; my $status = $a->{'up'} ? &ui_text_color($text{'ifcs_act'}, 'success') : &ui_text_color($text{'ifcs_down'}, 'danger'); $open = 1 if (!$a->{'up'}); $html_rows .= &ui_columns_row([$name, $type, $speed, $ip, $ipv6, $mask, $broad, $status]); } $html_start = &ui_columns_start( [ucwords($text{'ifcs_name'}), ucwords($text{'ifcs_type'}), $is_speed && ucwords($text{'ifcs_speed'}), ucwords($text{'ifcs_ip'}), $is_ipv6 && ucwords($ipv6t), ucwords($text{'ifcs_mask'}), ucwords($text{'ifcs_broad'}), ucwords($text{'ifcs_act'}), ]); $html_end .= &ui_columns_end(); $html = ($html_start . $html_rows . $html_end) if ($html_rows); } return ( { 'type' => 'html', 'desc' => $desc, 'open' => $open, 'id' => $module_name . '_net_info', 'html' => $html }); } sub ucwords { $_[0] =~ s/(\w+)/\u$1/g; return $_[0]; }Private