[ Avaa Bypassed ]




Upload:

Command:

www-data@18.191.137.190: ~ $
#!/usr/bin/perl
# save_options.cgi
# Save voicemail server options

require './vgetty-lib.pl';
&ReadParse();
&error_setup($text{'options_err'});
@conf = &get_config();

# Validate inputs
$in{'rings'} =~ /^\d+$/ || &error($text{'options_erings'});
$in{'rings'} >= 2 || &error($text{'options_erings2'});
$ans = &parse_answer_mode("ans");
$in{'maxlen'} =~ /^\d+$/ || &error($text{'options_emaxlen'});
$in{'minlen'} =~ /^\d+$/ || &error($text{'options_eminlen'});
$in{'thresh'} =~ /^\d+$/ || &error($text{'options_ethresh'});
if (!$in{'rgain_def'}) {
	$in{'rgain'} =~ /^\d+$/ || &error($text{'options_ergain'});
	$in{'rgain'} >= 0 && $in{'rgain'} <= 100 ||
		&error($text{'options_ergain2'});
	}
if (!$in{'tgain_def'}) {
	$in{'tgain'} =~ /^\d+$/ || &error($text{'options_etgain'});
	$in{'tgain'} >= 0 && $in{'tgain'} <= 100 ||
		&error($text{'options_etgain2'});
	}
defined(getpwnam($in{'owner'})) || &error($text{'options_eowner'});
defined(getgrnam($in{'group'})) || &error($text{'options_egroup'});
$in{'mode'} =~ /^0[0-7]{3}$/ || &error($text{'options_emode'});
if ($in{'prog_mode'} == 1) {
	$in{'email'} =~ /^\S+$/ || &error($text{'options_eemail'});
	}
elsif ($in{'prog_mode'} == 2) {
	$in{'prog'} =~ /^(\S+)/ && &has_command($1) ||
		&error($text{'options_eprog'});
	}

# Write to config files
&lock_file($config{'vgetty_config'});
$rings = &find_value("rings", \@conf);
if ($in{'rings_port'}) {
	local $tf = $rings =~ /^\// ? $rings : "/etc/rings";
	&open_lock_tempfile(TF, ">$tf");
	&print_tempfile(TF, $in{'rings'},"\n");
	&close_tempfile(TF);
	&save_directive(\@conf, "rings", $tf);
	}
else {
	if ($rings =~ /^\//) {
		&lock_file($rings);
		unlink($rings);
		&unlock_file($rings);
		}
	&save_directive(\@conf, "rings", $in{'rings'});
	}
$ans = &find_value("answer_mode", \@conf);
$mode = &parse_answer_mode("ans");
if ($in{'ans_port'}) {
	local $tf = $ans =~ /^\// ? $ans : "/etc/answer";
	&open_lock_tempfile(TF, ">$tf");
	&print_tempfile(TF, "$mode\n");
	&close_tempfile(TF);
	&save_directive(\@conf, "answer_mode", $tf);
	}
else {
	if ($ans =~ /^\//) {
		&lock_file($ans);
		unlink($ans)
		&unlock_file($ans);
		}
	&save_directive(\@conf, "answer_mode", $mode);
	}

&save_directive(\@conf, "rec_max_len", $in{'maxlen'});
&save_directive(\@conf, "rec_min_len", $in{'minlen'});
&save_directive(\@conf, "rec_remove_silence", $in{'silence'} ? "true" :"false");
&save_directive(\@conf, "rec_silence_threshold", $in{'thresh'});
&save_directive(\@conf, "receive_gain", $in{'rgain_def'} ? -1 : $in{'rgain'});
&save_directive(\@conf, "transmit_gain", $in{'tgain_def'} ? -1 : $in{'tgain'});
&save_directive(\@conf, "rec_always_keep", $in{'keep'} ? "true" : "false");
&save_directive(\@conf, "do_message_light", $in{'light'} ? "true" : "false");
&save_directive(\@conf, "phone_owner", $in{'owner'});
&save_directive(\@conf, "phone_group", $in{'group'});
&save_directive(\@conf, "phone_mode", $in{'mode'});
if ($in{'prog_mode'} == 1) {
	# Need to create the email wrapper script
	local $script = "$module_config_directory/email.pl";
	$perl_path = &get_perl_path();
	&lock_file($script);
	&open_tempfile(SCRIPT, ">$script");
	&print_tempfile(SCRIPT, <<EOF
#!/bin/sh -- # -*- perl -*-
eval 'exec $perl_path -S \$0 \${1+"\$\@"}'
        if \$running_under_some_shell;
open(CONF, "<$config_directory/miniserv.conf");
while(<CONF>) {
	\$root = \$1 if (/^root=(.*)/);
	}
close(CONF);
\$ENV{'WEBMIN_CONFIG'} = "$ENV{'WEBMIN_CONFIG'}";
\$ENV{'WEBMIN_VAR'} = "$ENV{'WEBMIN_VAR'}";
chdir("\$root/$module_name");
exec("\$root/$module_name/email.pl", \$ARGV[0]);
EOF
	);
	&close_tempfile(CMD);
	chmod(0755, $script);
	&unlock_file($script);
	&save_directive(\@conf, "message_program", $script);
	$config{'email_to'} = $in{'email'};
	&save_module_config();
	}
elsif ($in{'prog_mode'} == 2) {
	&save_directive(\@conf, "message_program", $in{'prog'});
	}
else {
	&save_directive(\@conf, "message_program", "");
	}
&flush_file_lines();
&unlock_file($config{'vgetty_config'});
&webmin_log("options");
&redirect("");


Filemanager

Name Type Size Permission Actions
images Folder 0755
lang Folder 0755
backup_config.pl File 923 B 0755
config File 63 B 0644
config.info File 109 B 0644
config.info.ca File 131 B 0644
config.info.cs File 124 B 0644
config.info.de File 119 B 0644
config.info.es File 131 B 0644
config.info.hu File 127 B 0644
config.info.ms File 111 B 0644
config.info.nl File 113 B 0644
config.info.no File 108 B 0644
config.info.pl File 133 B 0644
config.info.ru File 169 B 0644
config.info.uk File 172 B 0644
delete.cgi File 1.32 KB 0755
edit_options.cgi File 4.86 KB 0755
edit_vgetty.cgi File 2.78 KB 0755
email.pl File 1018 B 0755
index.cgi File 1.41 KB 0755
install_check.pl File 387 B 0755
list_messages.cgi File 2.49 KB 0755
list_received.cgi File 1.87 KB 0755
list_vgetty.cgi File 1.18 KB 0755
listen.cgi File 511 B 0755
log_parser.pl File 749 B 0755
module.info File 172 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 113 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 187 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 192 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 199 B 0644
module.info.ca File 116 B 0644
module.info.ca.auto File 15 B 0644
module.info.cs File 25 B 0644
module.info.cs.auto File 82 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 112 B 0644
module.info.de File 91 B 0644
module.info.de.auto File 15 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 225 B 0644
module.info.es File 41 B 0644
module.info.es.auto File 95 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 122 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 182 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 117 B 0644
module.info.fr File 0 B 0644
module.info.fr.auto File 127 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 133 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 116 B 0644
module.info.hu File 28 B 0644
module.info.hu.auto File 100 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 118 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 145 B 0644
module.info.ko File 0 B 0644
module.info.ko.auto File 119 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 122 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 125 B 0644
module.info.ms File 120 B 0644
module.info.ms.auto File 15 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 115 B 0644
module.info.nl File 25 B 0644
module.info.nl.auto File 78 B 0644
module.info.no File 25 B 0644
module.info.no.auto File 86 B 0644
module.info.pl File 32 B 0644
module.info.pl.auto File 95 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 131 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 140 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 124 B 0644
module.info.ru File 51 B 0644
module.info.ru.auto File 142 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 108 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 100 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 112 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 260 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 116 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 185 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 211 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 140 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 97 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 106 B 0644
save_options.cgi File 3.9 KB 0755
save_vgetty.cgi File 3.09 KB 0755
upload.cgi File 1.79 KB 0755
vgetty-lib.pl File 4.31 KB 0755
vgetty_apply.cgi File 228 B 0755