⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
webmin
/
smf
/
View File Name :
index.cgi
#!/usr/bin/perl # index.cgi # Display a list of services, built from svcs command $unsafe_index_cgi = 1; require './smf-lib.pl'; &ReadParse(); &ui_print_header(undef, $text{'index_title'}, "", "help", 1, 1, 0, &help_search_link("smf", "man", "doc", "howto")); # deal with application of state changes first. this way # fmri list will show changes... if (defined($in{'change_state'})) { $cmd = "$in{'change_state'}"; # get update fmri list @update_fmris = split(/\0/, $in{'applyto'}); &svc_state_cmd("$cmd", \@update_fmris); } # service type if (defined($in{'type'})) { $svc_type = $in{'type'}; } else { $svc_type = "All"; } if (defined($in{'include_disabled'})) { $include_disabled = $in{'include_disabled'}; } else { $include_disabled = $default_include_disabled; } if ($include_disabled == 1) { $checked_include_disabled = "checked"; } else { $checked_include_disabled = ""; } # opts for svcs listing $opts = "$default_svc_options"; if (defined($in{'opts'})) { @extraopts = split(/\0/, $in{'opts'}); foreach $extraopt (@extraopts) { $opts = "$opts,$extraopt"; } } $sortopt = "$default_sortopt"; if (defined($in{'sortopt'})) { $sortopt = $in{'sortopt'}; } print "
"; &text_and_whats_this("index_detail"); print "
\n"; # Checkboxes for view update print "
\n"; print "
\n"; print "
$text{'index_svc_type'}
\n"; print "
"; @typelist = sort keys %svc_types; &print_selection("type", "$svc_type", \@typelist); print "
\n"; print "
$text{'index_extraopts'}
\n"; print "\n"; print "
"; @additional_option_names = sort keys %svc_options; foreach $o (@additional_option_names) { if ($default_svc_options =~ /$o/) { next; } $checked = "unchecked"; if ($opts=~ /$o/) { $checked = "checked"; $opts_str="$opts_str\&opts=$o"; } print "$svc_options{$o}"; print "
"; } print "
\n"; print "
$text{'index_include_disabled'}
\n"; print "
"; print "
"; print "
\n"; print "
\n"; print "
"; print "
\n"; print "
\n"; print "
\n"; print "
\n"; # multiple select buttons(enable, disable, maintenance, degraded, clear, delete) print "
\n"; print "
"; print " "; print "
\n"; print "
$text{'index_apply'}
: "; &print_state_buttons(); # add delete/create new buttons in addition to statechange buttons print "
\n"; print "
\n"; print "
\n"; @svcs_info = &svcs_listing("$svc_types{$svc_type}", "$sortopt"); @optlist = split(/,/, $opts); print "
\n"; print "
$text{'index_select'}
\n"; foreach $o (@optlist) { # clicking should reverse sort option if we`re already sorting by # this option... if ($sortopt =~/-S$o/) { $new_sortopt = "-s$o"; } elsif ($sortopt =~/-s$o/) { $new_sortopt = "-S$o"; } else { $new_sortopt = "-s$o"; } print "
"; print "$text{'index_sort_by'}: "; print "
"; print "$svc_options{$o}
\n"; } print "
\n"; for $svc_info (@svcs_info) { # if we are displaying enabled only, skip disabled if (($include_disabled != 1) && ($svc_info->{'STATE'} eq "disabled")) { next; } print "
"; $fmri = $svc_info->{'FMRI'}; if ("$fmri" =~ /^lrc:\//) { print "
-
\n"; } else { print "
{'FMRI'}\">
\n"; } foreach $opt (@optlist) { $field = $svc_info->{$opt}; if ($opt eq "FMRI") { $field =~ /$svc_types{$svc_type}(.*)/; $svc = $1; # make sure legacy svcs are unclickable! if ($field =~ /svc:\//) { print "
"; print "
$svc
"; print "
\n"; } else { print "
$svc
\n"; } } elsif ($opt eq "STATE") { print "
"; print "
{$opt}}>$svc_info->{$opt}
\n"; print "
\n"; } else { print "
$field
" } } print "
\n"; } print "
\n"; &print_cmds_run(); &ui_print_footer("/", $text{'index'});