[ Avaa Bypassed ]




Upload:

Command:

www-data@3.19.255.50: ~ $
#!/usr/bin/perl
# save_recipe.cgi
# Create, update or delete a procmail recipe

require './procmail-lib.pl';
&ReadParse();
&lock_file($procmailrc);
@conf = &get_procmailrc();
$rec = $conf[$in{'idx'}] if (!$in{'new'});

if ($in{'delete'}) {
	# Just delete the recipe
	&delete_recipe($rec);
	}
else {
	# Validate inputs
	&error_setup($text{'save_err'});
	if ($in{'block'}) {
		# Conditional code block
		$in{'bdata'} =~ s/\r//g;
		$rec->{'block'} = $in{'bdata'};
		}
	else {
		# Normal action
		$in{'action'} =~ /\S/ ||
			&error($text{'save_eaction_'.$in{'amode'}});
		delete($rec->{'type'});
		if ($in{'amode'} == 0) {
			$rec->{'action'} = $in{'action'};
			}
		elsif ($in{'amode'} == 1) {
			$rec->{'action'} = $in{'action'}."/.";
			}
		elsif ($in{'amode'} == 2) {
			$rec->{'action'} = $in{'action'}."/";
			}
		elsif ($in{'amode'} == 3) {
			$rec->{'type'} = "!";
			$rec->{'action'} = $in{'action'};
			}
		elsif ($in{'amode'} == 6) {
			$rec->{'type'} = "=";
			$in{'action'} =~ /^(\S+)=(.*)$/ ||
				&error($text{'save_eactionvar'});
			$rec->{'action'} = $in{'action'};
			}
		else {
			$rec->{'type'} = "|";
			$rec->{'action'} = $in{'action'};
			}
		}

	map { $flag{$_}++ } split(/\0/, $in{'flag'});
	@flags = @{$rec->{'flags'}};
	foreach $f (@known_flags) {
		if ($flag{$f}) {
			push(@flags, $f);
			}
		else {
			@flags = grep { $_ ne $f } @flags;
			}
		}
	$rec->{'flags'} = [ &unique(@flags) ];

	if ($in{'lockfile_def'} == 1) {
		delete($rec->{'lockfile'});
		}
	elsif ($in{'lockfile_def'} == 2) {
		$rec->{'lockfile'} = "";
		}
	else {
		$in{'lockfile'} =~ /\S/ || &error($text{'save_elockfile'});
		$rec->{'lockfile'} = $in{'lockfile'};
		}

	for($i=0; defined($m = $in{"cmode_$i"}); $i++) {
		next if ($m eq '-');
		$c = $in{"cond_$i"};
		if ($m eq '<' || $m eq '>') {
			$c =~ /^\d+$/ || &error(&text('save_esize', $i+1));
			}
		elsif ($m eq '$' || $m eq '?') {
			$c =~ /\S/ || &error(&text('save_eshell', $i+1));
			}
		else {
			$c =~ /\S/ || &error(&text('save_ere', $i+1));
			}
		push(@conds, [ $m, $c ]);
		}
	$rec->{'conds'} = \@conds;

	# Save the receipe
	if ($in{'new'}) {
		if ($in{'before'} ne '') {
			$before = $conf[$in{'before'}];
			&create_recipe_before($rec, $before);
			}
		elsif ($in{'after'} ne '') {
			if ($in{'after'} == @conf-1) {
				&create_recipe($rec);
				}
			else {
				$before = $conf[$in{'after'}+1];
				&create_recipe_before($rec, $before);
				}
			}
		else {
			&create_recipe($rec);
			}
		}
	else {
		&modify_recipe($rec);
		}
	}
&unlock_file($procmailrc);
&webmin_log($in{'delete'} ? "delete" : $in{'new'} ? "create" : "modify",
	    "recipe", undef, $rec);
&redirect("");


Filemanager

Name Type Size Permission Actions
images Folder 0755
lang Folder 0755
CHANGELOG File 289 B 0644
backup_config.pl File 649 B 0755
cgi_args.pl File 488 B 0755
config File 56 B 0644
config-freebsd File 66 B 0644
config.info File 237 B 0644
config.info.ca File 281 B 0644
config.info.cs File 212 B 0644
config.info.de File 265 B 0644
config.info.es File 57 B 0644
config.info.fr File 265 B 0644
config.info.hu File 0 B 0644
config.info.ko File 272 B 0644
config.info.nl File 262 B 0644
config.info.no File 244 B 0644
config.info.pl File 0 B 0644
config.info.ru File 278 B 0644
config.info.uk File 296 B 0644
delete_recipes.cgi File 418 B 0755
down.cgi File 277 B 0755
edit_env.cgi File 1022 B 0755
edit_inc.cgi File 864 B 0755
edit_recipe.cgi File 2.75 KB 0755
index.cgi File 4.79 KB 0755
install_check.pl File 483 B 0755
log_parser.pl File 764 B 0755
manual_form.cgi File 533 B 0755
manual_save.cgi File 331 B 0755
module.info File 198 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 161 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 222 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 265 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 225 B 0644
module.info.ca File 142 B 0644
module.info.ca.auto File 17 B 0644
module.info.cs File 35 B 0644
module.info.cs.auto File 137 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 154 B 0644
module.info.de File 149 B 0644
module.info.de.auto File 17 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 335 B 0644
module.info.es File 34 B 0644
module.info.es.auto File 150 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 175 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 243 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 179 B 0644
module.info.fr File 36 B 0644
module.info.fr.auto File 139 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 183 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 158 B 0644
module.info.hu File 37 B 0644
module.info.hu.auto File 135 B 0644
module.info.it File 37 B 0644
module.info.it.auto File 129 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 216 B 0644
module.info.ko File 31 B 0644
module.info.ko.auto File 152 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 170 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 177 B 0644
module.info.ms File 132 B 0644
module.info.ms.auto File 17 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 159 B 0644
module.info.nl File 31 B 0644
module.info.nl.auto File 136 B 0644
module.info.no File 31 B 0644
module.info.no.auto File 123 B 0644
module.info.pl File 33 B 0644
module.info.pl.auto File 138 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 156 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 165 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 160 B 0644
module.info.ru File 47 B 0644
module.info.ru.auto File 219 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 171 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 139 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 157 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 248 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 165 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 250 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 229 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 185 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 154 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 163 B 0644
prefs.info File 16 B 0644
procmail-lib.pl File 9.39 KB 0755
save_env.cgi File 753 B 0755
save_inc.cgi File 680 B 0755
save_recipe.cgi File 2.58 KB 0755
up.cgi File 271 B 0755