[ Avaa Bypassed ]




Upload:

Command:

www-data@18.190.156.78: ~ $
#!/usr/bin/perl
# save_conf.cgi
# Save configuration options

require './heartbeat-lib.pl';
&ReadParse();
@conf = &get_ha_config();
&error_setup($text{'conf_err'});

# Parse and validate inputs
for($i=0; defined($in{"serial_$i"}); $i++) {
	push(@serials, $in{"serial_$i"}) if ($in{"serial_$i"});
	}
&save_directive(\@conf, 'serial', \@serials );

if ($in{'baud_def'}) {
	&save_directive(\@conf, 'baud', [ ]);
	}
else {
	$in{'baud'} =~ /^\d+$/ || &error($text{'conf_ebaud'});
	&save_directive(\@conf, 'baud', [ $in{'baud'} ]);
	}

# changed (Christof Amelunxen, 22.08.2003)
# udp now bcast
if ($in{'bcasts_def'}) {
	&save_directive(\@conf, 'bcast', [ ]);
	}
else {
	@bcasts = split(/\s+/, $in{'bcasts'});
	foreach $b (@bcasts) {
		$b =~ /^\S+\d+$/ || &error(&text('conf_ebcastif', $b));
		}
	@bcasts || &error($text{'conf_ebcasts'});
	&save_directive(\@conf, 'bcast', \@bcasts);
	}

if ($in{'udpport_def'}) {
	&save_directive(\@conf, 'udpport', [ ]);
	}
else {
	$in{'udpport'} =~ /^\d+$/ || &error($text{'conf_eudpport'});
	&save_directive(\@conf, 'udpport', [ $in{'udpport'} ]);
	}

if ($in{'mcast_def'}) {
	&save_directive(\@conf, 'mcast', [ ]);
	}
else {
	$in{'mcast_dev'} =~ /^\S+\d+$/ || &error($text{'conf_emcast_dev'});
	&check_ipaddress($in{'mcast_ip'}) || &error($text{'conf_emcast_ip'});
	$in{'mcast_port'} =~ /^\d+$/ || &error($text{'conf_emcast_port'});
	$in{'mcast_ttl'} =~ /^\d+$/ || &error($text{'conf_emcast_ttl'});
	&save_directive(\@conf, 'mcast', [ join(" ",
		$in{'mcast_dev'}, $in{'mcast_ip'}, $in{'mcast_port'},
		$in{'mcast_ttl'}, $in{'mcast_loop'}) ] );
	}

if ($in{'keepalive_def'}) {
	&save_directive(\@conf, 'keepalive', [ ]);
	}
else {
	$in{'keepalive'} =~ /^\d+$/ || &error($text{'conf_ekeepalive'});
	&save_directive(\@conf, 'keepalive', [ $in{'keepalive'} ]);
	}

if ($in{'deadtime_def'}) {
	&save_directive(\@conf, 'deadtime', [ ]);
	}
else {
	$in{'deadtime'} =~ /^\d+$/ || &error($text{'conf_edeadtime'});
	&save_directive(\@conf, 'deadtime', [ $in{'deadtime'} ]);
	}

if ($in{'watchdog_def'}) {
	&save_directive(\@conf, 'watchdog', [ ]);
	}
else {
	-r $in{'watchdog'} || &error($text{'conf_ewatchdog'});
	&save_directive(\@conf, 'watchdog', [ $in{'watchdog'} ]);
	}

@node = split(/\s+/, $in{'node'});
@node || &error($text{'conf_enonode'});
$uname = `uname -n 2>/dev/null`;
$uname =~ s/\r|\n//g;
foreach $n (@node) {
	$found++ if ($n eq $uname);
	}
!$uname || $found || &error(&text('conf_ethisnode', "<tt>$uname</tt>"));
&save_directive(\@conf, 'node', \@node);

if ($in{'logfile_def'}) {
	&save_directive(\@conf, 'logfile', [ ]);
	}
else {
	$in{'logfile'} =~ /^\S+$/ || &error($text{'conf_elogfile'});
	&save_directive(\@conf, 'logfile', [ $in{'logfile'} ]);
	}

if ($in{'logfacility_def'}) {
	&save_directive(\@conf, 'logfacility', [ ]);
	}
else {
	&save_directive(\@conf, 'logfacility', [ $in{'logfacility'} ]);
	}

if ($in{'initdead_def'}) {
	&save_directive(\@conf, 'initdead', [ ]);
	}
else {
	$in{'initdead'} =~ /^\d+$/ || &error($text{'conf_einitdead'});
	$in{'deadtime_def'} || $in{'initdead'} >= $in{'deadtime'}*2 ||
		&error($text{'conf_einitdead2'});
	&save_directive(\@conf, 'initdead', [ $in{'initdead'} ]);
	}

# save nice failback behaviour
if (&version_atleast(1, 2, 0)) {
	# New-style option
	if ($in{'auto_failback'}) {
		&save_directive(\@conf, 'auto_failback',
			        [ $in{'auto_failback'} ]);
		}
	else {
		&save_directive(\@conf, 'auto_failback', [ ]);
		}
	}
else {
	# Old-style option
	if ($in{'nice_failback_def'}) {
		&save_directive(\@conf,'nice_failback',[ 'on' ]);
		}
	else {
		&save_directive(\@conf,'nice_failback', [ 'off' ]);
		}
	}
	

&flush_file_lines();
&redirect("");


Filemanager

Name Type Size Permission Actions
images Folder 0755
lang Folder 0755
apply.cgi File 219 B 0755
backup_config.pl File 630 B 0755
config File 479 B 0644
config-freebsd File 415 B 0644
config-generic-linux File 322 B 0644
config-slackware-linux File 322 B 0644
config-solaris File 235 B 0644
config-syno-linux File 219 B 0644
config.info File 726 B 0644
config.info.bg File 1.28 KB 0644
config.info.ca File 846 B 0644
config.info.cs File 676 B 0644
config.info.de File 862 B 0644
config.info.es File 524 B 0644
config.info.hu File 483 B 0644
config.info.nl File 798 B 0644
config.info.no File 760 B 0644
edit_auth.cgi File 944 B 0755
edit_conf.cgi File 6.68 KB 0755
edit_node.cgi File 2.96 KB 0755
edit_res.cgi File 2.26 KB 0755
feedback_files.pl File 110 B 0755
heartbeat-lib.pl File 4.79 KB 0755
index.cgi File 3.3 KB 0755
install_check.pl File 564 B 0755
module.info File 200 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 126 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 178 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 216 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 248 B 0644
module.info.ca File 135 B 0644
module.info.ca.auto File 22 B 0644
module.info.cs File 26 B 0644
module.info.cs.auto File 138 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 124 B 0644
module.info.de File 129 B 0644
module.info.de.auto File 19 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 260 B 0644
module.info.es File 26 B 0644
module.info.es.auto File 143 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 146 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 181 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 140 B 0644
module.info.fr File 0 B 0644
module.info.fr.auto File 168 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 180 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 147 B 0644
module.info.hu File 0 B 0644
module.info.hu.auto File 159 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 151 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 190 B 0644
module.info.ko File 0 B 0644
module.info.ko.auto File 169 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 161 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 141 B 0644
module.info.ms File 121 B 0644
module.info.ms.auto File 18 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 155 B 0644
module.info.nl File 25 B 0644
module.info.nl.auto File 112 B 0644
module.info.no File 29 B 0644
module.info.no.auto File 103 B 0644
module.info.pl File 0 B 0644
module.info.pl.auto File 147 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 166 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 175 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 152 B 0644
module.info.ru File 0 B 0644
module.info.ru.auto File 237 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 141 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 142 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 134 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 291 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 159 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 220 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 205 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 170 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 118 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 127 B 0644
save_auth.cgi File 469 B 0755
save_conf.cgi File 3.56 KB 0755
save_node.cgi File 1.27 KB 0755
start.cgi File 246 B 0755