!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/libexec/webmin/init/   drwxr-xr-x
Free 3.84 GB of 27.03 GB (14.19%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     save_rc.cgi (2.48 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Create, update or delete a BSD RC script

require './init-lib.pl';
&ReadParse();
$access{'bootup'} || &error($text{'edit_ecannot'});
&foreign_require("proc", "proc-lib.pl");

@rcs = &list_rc_scripts();
if (!$in{'new'}) {
    ($rc) = grep { $_->{'name'} eq $in{'name'} } @rcs;
    $rc || &error($text{'edit_egone'});
    }

if ($in{'delete'}) {
    # Delete the action script
    &delete_rc_script($in{'name'});
    &webmin_log("delete", "action", $in{'name'});
    &redirect("");
    }
elsif ($in{'start'} || $in{'stop'} || $in{'status'}) {
    # Run now
    $mode = $in{'start'} ? "start" :
        $in{'stop'} ? "stop" : "status";
    &ui_print_header(undef, $text{'ss_'.$mode}, "");
    print &text('ss_doing'.$mode, "<tt>$in{'name'}</tt>"),"<br>\n";
    $cmd = "$rc->{'file'} $mode";
    print "<pre>";
    &foreign_call("proc", "safe_process_exec_logged", $cmd, 0, 0, STDOUT, undef, 1);
    print "</pre>\n";
    &webmin_log($mode, 'action', $in{'name'});
    &ui_print_footer("edit_rc.cgi?name=".&urlize($in{'name'}),
             $text{'edit_return'});
    }
else {
    # Validate inputs
    if ($in{'new'}) {
        $in{'name'} =~ /^[A-z0-9\_\-\.]+$/ ||
            &error($text{'save_ename'});
        ($clash) = grep { $_->{'name'} eq $in{'name'} } @rcs;
        $clash && &error($text{'save_eclash'});
        $in{'start_cmd'} =~ /\S/ || &error($text{'save_estartcmd'});

        @dirs = split(/\s+/, $config{'rc_dir'});
        $file = $dirs[$#dir]."/".$in{'name'};
        $data =  "#!/bin/sh\n";
        $data .= "#\n";
        $data .= "# PROVIDE: $in{'name'}\n";
        $data .= "# REQUIRE: LOGIN\n";
        $data .= "\n";
        $data .= ". /etc/rc.subr\n";
        $data .= "\n";
        $data .= "name=$in{'name'}\n";
        $data .= "rcvar=`set_rcvar`\n";
        $data .= "start_cmd=\"$in{'start_cmd'}\"\n";
        if ($in{'stop_cmd'}) {
            $data .= "stop_cmd=\"$in{'stop_cmd'}\"\n";
            }
        if ($in{'status_cmd'}) {
            $data .= "status_cmd=\"$in{'status_cmd'}\"\n";
            }
        $data .= "\n";
        $data .= "load_rc_config \${name}\n";
        $data .= "run_rc_command \"\$1\"\n";
        }
    else {
        $data = $in{'script'};
        $data =~ s/\r//g;
        $data =~ /\S/ || &error($text{'save_escript'});
        $file = $rc->{'file'};
        }

    # Write out the file
    &open_lock_tempfile(SCRIPT, ">$file");
    &print_tempfile(SCRIPT, $data);
    &close_tempfile(SCRIPT);
    &set_ownership_permissions(undef, undef, 0755, $file);

    if ($rc->{'enabled'} != 2) {
        # Enable or disable
        &lock_rc_files();
        if ($in{'enabled'}) {
            &enable_rc_script($in{'name'});
            }
        else {
            &disable_rc_script($in{'name'});
            }
        &unlock_rc_files();
        }

    &webmin_log($in{'new'} ? "create" : "modify", "action", $in{'name'});
    &redirect("");
    }


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0029 ]--