[ Avaa Bypassed ]




Upload:

Command:

www-data@3.137.210.133: ~ $
#!/usr/bin/perl

BEGIN { push(@INC, ".."); };
use WebminCore;
&init_config();

# parse_inittab()
# Returns a list of entries from the /etc/inittab file
sub parse_inittab
{
local @rv;
local $lnum = 0;
open(INITTAB, "<".$config{'inittab_file'});
while(<INITTAB>) {
	s/\r|\n//g;
	#s/#.*$//g;
	s/\/\/.*$//g;
	if ($gconfig{'os_type'} eq 'aix') {
		# A leading : indicates a comment on AIX
		s/^:.*$//g;
		}
	next if (/^\s*#\s*\$Header/i);	# CVS header
	local $sline = $lnum;
	# Join \ lines
	while(/\\$/) {
		local $nl = <INITTAB>;
		s/\\$//;
		$nl =~ s/^\s+//;
		$_ .= $nl;
		$lnum++;
		}
	if (/^(#*)\s*\$Id/ || /^(#*)\s*\/etc/ || /^(#*)\s*<id>/) {
		# Skip this line
		}
	elsif (/^(#*)\s*([^:]+):([^:]*):([^:]+):([^:]*)/) {
		push(@rv, { 'id' => $2,
			    'action' => $4,
			    'process' => $5,
			    'comment' => $1 ne '',
			    'levels' => [ split(//, $3) ],
			    'line' => $sline,
			    'eline' => $lnum,
			    'index' => scalar(@rv) });
		}
	$lnum++;
	}
close(INITTAB);
return @rv;
} 

# create_inittab(&inittab)
# Adds an entry to /etc/inittab
sub create_inittab
{
&open_tempfile(INITTAB, ">>$config{'inittab_file'}");
&print_tempfile(INITTAB, $_[0]->{'comment'} ? "# " : "",
	      join(":", $_[0]->{'id'}, join("", @{$_[0]->{'levels'}}),
			$_[0]->{'action'}, $_[0]->{'process'}),"\n");
&close_tempfile(INITTAB);
}

# modify_inittab(&inittab)
# Replaces an /etc/inittab entry
sub modify_inittab
{
local $lref = &read_file_lines($config{'inittab_file'});
splice(@$lref, $_[0]->{'line'}, $_[0]->{'eline'} - $_[0]->{'line'} + 1,
       ($_[0]->{'comment'} ? "# " : "").
       join(":", $_[0]->{'id'}, join("", @{$_[0]->{'levels'}}),
		 $_[0]->{'action'}, $_[0]->{'process'}));
&flush_file_lines();
}

# delete_inittab(&inittab)
# Delete a single /etc/inittab entry
sub delete_inittab
{
local $lref = &read_file_lines($config{'inittab_file'});
splice(@$lref, $_[0]->{'line'}, $_[0]->{'eline'} - $_[0]->{'line'} + 1);
&flush_file_lines();
}

sub list_runlevels
{
return ( 0..6, "a", "b", "c" );
}

sub list_actions
{
return ( [ "respawn", $text{ 'inittab_respawn' } ],
	 [ "wait", $text{ 'inittab_wait' } ],
	 [ "once", $text{ 'inittab_once' } ],
	 [ "ondemand", $text{ 'inittab_ondemand' } ],
         [ "initdefault", $text{ 'inittab_initdefault' } ],
	 [ "sysinit", $text{ 'inittab_sysinit' } ],
	 [ "powerwait", $text{ 'inittab_powerwait' } ],
	 [ "powerfail", $text{ 'inittab_powerfail' } ],
	 [ "powerokwait", $text{ 'inittab_powerokwait' } ],
	 [ "powerfailnow", $text{ 'inittab_powerfailnow' } ],
	 [ "ctrlaltdel", $text{ 'inittab_ctrlaltdel' } ],
	 [ "kbdrequest", $text{ 'inittab_kbdrequest' } ],
	 [ "bootwait", $text{'inittab_bootwait'} ],
	 [ "boot", $text{'inittab_boot'} ],
	 [ "off", $text{'inittab_off'} ],
	);
}


Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
CHANGELOG File 294 B 0644
apply.cgi File 260 B 0755
backup_config.pl File 685 B 0755
config File 42 B 0644
config-solaris File 47 B 0644
config-syno-linux File 42 B 0644
config.info File 100 B 0644
config.info.ca File 110 B 0644
config.info.cs File 105 B 0644
config.info.de File 111 B 0644
config.info.es File 109 B 0644
config.info.fr File 121 B 0644
config.info.hu File 0 B 0644
config.info.ko File 95 B 0644
config.info.ms File 110 B 0644
config.info.nl File 109 B 0644
config.info.pl File 42 B 0644
config.info.ru File 93 B 0644
config.info.sv File 41 B 0644
config.info.tr File 104 B 0644
config.info.uk File 95 B 0644
config.info.zh File 39 B 0644
config.info.zh_TW File 49 B 0644
delete.cgi File 510 B 0755
edit_inittab.cgi File 1.59 KB 0755
index.cgi File 1.92 KB 0755
inittab-lib.pl File 2.67 KB 0755
install_check.pl File 393 B 0755
log_parser.pl File 869 B 0755
module.info File 270 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 239 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 304 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 333 B 0644
module.info.ca File 0 B 0644
module.info.ca.auto File 196 B 0644
module.info.cs File 0 B 0644
module.info.cs.auto File 198 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 171 B 0644
module.info.de File 0 B 0644
module.info.de.auto File 200 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 314 B 0644
module.info.es File 0 B 0644
module.info.es.auto File 196 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 157 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 244 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 187 B 0644
module.info.fr File 0 B 0644
module.info.fr.auto File 181 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 226 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 180 B 0644
module.info.hu File 0 B 0644
module.info.hu.auto File 210 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 160 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 170 B 0644
module.info.ko File 0 B 0644
module.info.ko.auto File 175 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 183 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 197 B 0644
module.info.ms File 0 B 0644
module.info.ms.auto File 167 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 180 B 0644
module.info.nl File 0 B 0644
module.info.nl.auto File 172 B 0644
module.info.no File 0 B 0644
module.info.no.auto File 172 B 0644
module.info.pl File 0 B 0644
module.info.pl.auto File 191 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 203 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 212 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 195 B 0644
module.info.ru File 0 B 0644
module.info.ru.auto File 273 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 209 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 158 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 159 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 276 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 177 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 322 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 224 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 197 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 139 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 148 B 0644
save_inittab.cgi File 1.23 KB 0755