[ Avaa Bypassed ]




Upload:

Command:

www-data@3.129.22.159: ~ $
#!/usr/bin/perl
# save_dump.cgi
# Save the details of a scheduled backup

require './fsdump-lib.pl';
&foreign_require("cron", "cron-lib.pl");
&ReadParse();
&error_setup($text{'save_err'});

# Create wrapper for ftp transfer script
&cron::create_wrapper($ftp_cmd, $module_name, "ftp.pl");

if ($in{'id'}) {
	$dump = &get_dump($in{'id'});
	$access{'edit'} && &can_edit_dir($dump) ||
		&error($text{'dump_ecannot2'});
	@jobs = &foreign_call("cron", "list_cron_jobs");
	foreach $j (@jobs) {
		$job = $j if ($j->{'command'} eq "$cron_cmd $dump->{'id'}");
		}
	$oldenabled = $dump->{'enabled'};
	}
else {
	$access{'edit'} || &error($text{'dump_ecannot1'});
	}

if ($in{'delete'}) {
	# Just delete this dump
	&delete_dump($dump);
	if ($job) {
		&lock_file($job->{'file'});
		&foreign_call("cron", "delete_cron_job", $job);
		&unlock_file($job->{'file'});
		}
	delete($dump->{'pass'});
	&webmin_log("delete", undef, $dump->{'id'}, $dump);
	&redirect("");
	}
elsif ($in{'restore'}) {
	# Redirect to restore form
	&redirect("restore_form.cgi?fs=$dump->{'fs'}&id=$in{'id'}");
	}
elsif ($in{'clone'}) {
	# Redirect to create form, but in clone mode
	&redirect("edit_dump.cgi?id=$in{'id'}&clone=1");
	}
else {
	# Validate and store inputs
	if (&multiple_directory_support($in{'fs'})) {
		$in{'dir'} =~ s/[\r\n]+/\t/g;
		foreach $d (split(/\t+/, &date_subs($in{'dir'}))) {
			-d $d || &error($text{'save_edir'});
			if ($in{'fs'} ne 'tar') {
				$fs = &directory_filesystem($d);
				&same_filesystem($fs, $in{'fs'}) ||
					&error($text{'save_efs'});
				}
			&can_edit_dir($d) || &error($text{'dump_ecannot3'});
			}
		$in{'dir'} || &error($text{'save_edir'});
		$dump->{'tabs'} = 1;	# tab used to split dirs
		}
	else {
		$d = &date_subs($in{'dir'});
		-d $d || &error($text{'save_edir'});
		if ($in{'fs'} ne 'tar') {
			$fs = &directory_filesystem($d);
			&same_filesystem($fs, $in{'fs'}) ||
				&error($text{'save_efs'});
			}
		&can_edit_dir($d) || &error($text{'dump_ecannot3'});
		}
	$dump->{'dir'} = $in{'dir'};
	$dump->{'fs'} = $in{'fs'};
	$dump->{'email'} = $in{'email'};
	$dump->{'subject'} = $in{'subject_def'} ? undef : $in{'subject'};
	if ($access{'extra'}) {
		$dump->{'extra'} = $in{'extra'};
		}
	if ($access{'cmds'}) {
		$dump->{'before'} = $in{'before'};
		$dump->{'after'} = $in{'after'};
		$dump->{'beforefok'} = !$in{'beforefok'};
		$dump->{'afterfok'} = !$in{'afterfok'};
		$dump->{'afteraok'} = !$in{'afteraok'};
		}
	$in{'file'} =~ s/^\s+//; $in{'file'} =~ s/\s+$//;
	$in{'hfile'} =~ s/^\s+//; $in{'hfile'} =~ s/\s+$//;
	&parse_dump($dump);
	$dump->{'reverify'} = $in{'reverify'} if (defined(&verify_dump));
	$dump->{'enabled'} = $in{'enabled'};
	$dump->{'follow'} = $in{'enabled'} == 2 ? $in{'follow'} : undef;
	&foreign_call("cron", "parse_times_input", $dump, \%in);

	# Create or update the dump and cron job
	&lock_file($cron_cmd);
	&cron::create_wrapper($cron_cmd, $module_name, "backup.pl");
	&unlock_file($cron_cmd);
	&save_dump($dump);
	local $oldjob = $job;
	if ($dump->{'enabled'} == 1) {
		# Create cron job and script
		$job->{'user'} = 'root';
		$job->{'active'} = 1;
		$job->{'special'} = $dump->{'special'};
		$job->{'mins'} = $dump->{'mins'};
		$job->{'hours'} = $dump->{'hours'};
		$job->{'days'} = $dump->{'days'};
		$job->{'months'} = $dump->{'months'};
		$job->{'weekdays'} = $dump->{'weekdays'};
		$job->{'command'} = "$cron_cmd $dump->{'id'}";
		}
	&lock_file(&cron::cron_file($job)) if ($job);
	if ($dump->{'enabled'} == 1 && !$oldjob) {
		# Create the cron job
		&foreign_call("cron", "create_cron_job", $job); 
		}
	elsif ($dump->{'enabled'} == 1 && $oldjob) {
		# Update the cron job
		&foreign_call("cron", "change_cron_job", $job); 
		}
	elsif ($dump->{'enabled'} != 1 && $oldjob) {
		# Delete the cron job
		&foreign_call("cron", "delete_cron_job", $job);
		}
	&unlock_file(&cron::cron_file($job)) if ($job);

	delete($dump->{'pass'});
	&webmin_log($in{'id'} ? "modify" : "create", undef,
		    $dump->{'id'}, $dump);
	if ($in{'savenow'}) {
		&redirect("backup.cgi?id=$dump->{'id'}");
		}
	else {
		&redirect("");
		}
	}


Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
CHANGELOG File 3.42 KB 0644
acl_security.pl File 1.16 KB 0755
backup.cgi File 2.27 KB 0755
backup.pl File 3.17 KB 0755
cgi_args.pl File 361 B 0755
config File 91 B 0644
config.info File 534 B 0644
config.info.ar File 640 B 0644
config.info.ca File 658 B 0644
config.info.cs File 437 B 0644
config.info.de File 632 B 0644
config.info.es File 430 B 0644
config.info.hu File 0 B 0644
config.info.ko File 451 B 0644
config.info.nl File 608 B 0644
config.info.no File 588 B 0644
config.info.pl File 672 B 0644
config.info.pt_BR File 440 B 0644
config.info.ru File 144 B 0644
config.info.uk File 157 B 0644
defaultacl File 39 B 0644
delete_dumps.cgi File 720 B 0755
edit_dump.cgi File 5.54 KB 0755
feedback_files.pl File 229 B 0755
freebsd-lib.pl File 12.2 KB 0755
fsdump-lib.pl File 8.1 KB 0755
ftp.pl File 3.69 KB 0755
index.cgi File 4.63 KB 0755
install_check.pl File 379 B 0755
irix-lib.pl File 8.19 KB 0755
kill.cgi File 877 B 0755
linux-lib.pl File 23.24 KB 0755
log_parser.pl File 770 B 0755
macos-lib.pl File 12.2 KB 0755
module.info File 447 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 162 B 0644
module.info.ar File 232 B 0644
module.info.ar.auto File 19 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 307 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 298 B 0644
module.info.ca File 138 B 0644
module.info.ca.auto File 17 B 0644
module.info.cs File 31 B 0644
module.info.cs.auto File 116 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 152 B 0644
module.info.de File 146 B 0644
module.info.de.auto File 13 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 355 B 0644
module.info.es File 50 B 0644
module.info.es.auto File 149 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 170 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 235 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 188 B 0644
module.info.fr File 0 B 0644
module.info.fr.auto File 191 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 188 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 168 B 0644
module.info.hu File 31 B 0644
module.info.hu.auto File 155 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 181 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 231 B 0644
module.info.ko File 32 B 0644
module.info.ko.auto File 125 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 178 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 157 B 0644
module.info.ms File 123 B 0644
module.info.ms.auto File 19 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 153 B 0644
module.info.nl File 27 B 0644
module.info.nl.auto File 130 B 0644
module.info.no File 35 B 0644
module.info.no.auto File 127 B 0644
module.info.pl File 102 B 0644
module.info.pl.auto File 18 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 159 B 0644
module.info.pt_BR File 41 B 0644
module.info.pt_BR.auto File 127 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 164 B 0644
module.info.ru File 50 B 0644
module.info.ru.auto File 218 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 160 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 176 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 158 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 265 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 162 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 305 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 223 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 183 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 119 B 0644
module.info.zh_TW File 30 B 0644
module.info.zh_TW.auto File 98 B 0644
multi.pl File 572 B 0755
newtape.cgi File 592 B 0755
newtape.pl File 1.58 KB 0755
notape.pl File 493 B 0755
prefs.info File 21 B 0644
restore.cgi File 935 B 0755
restore_form.cgi File 1.1 KB 0755
rmulti.pl File 784 B 0755
save_dump.cgi File 3.97 KB 0755
solaris-lib.pl File 6.36 KB 0755
uninstall.pl File 347 B 0755