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

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

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


Viewing file:     save_vgetty.cgi (3.09 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_vgetty.cgi
# Save, create or delete a serial port configuration

require './vgetty-lib.pl';
&foreign_require("inittab", "inittab-lib.pl");
&ReadParse();
@inittab = &inittab::parse_inittab();
@vgt = &vgetty_inittabs();
if (!$in{'new'}) {
    ($init) = grep { $_->{'id'} eq $in{'id'} } @vgt;
    $oldtty = $init->{'tty'};
    $oldtty = "/dev/$oldtty" if ($oldtty !~ /^\//);
    }
@conf = &get_config();
$rings = &find_value("rings", \@conf);
$ans = &find_value("answer_mode", \@conf);

&lock_file($inittab::config{'inittab_file'});
if ($in{'delete'}) {
    # Just deleting an inittab entry
    &inittab::delete_inittab($init);
    if (defined($in{'rings_def'})) {
        local $tf = &tty_opt_file($ans, $oldtty);
        &lock_file($tf);
        unlink($tf);
        &unlock_file($tf);
        }
    if (defined($in{'ans_def'})) {
        $tf = &tty_opt_file($rings, $oldtty);
        &lock_file($tf);
        unlink($tf);
        &unlock_file($tf);
        }
    }
else {
    # Validate and store inputs
    &error_setup($text{'vgetty_err'});
    $cmd = $in{'new'} ? &has_command("vgetty") : $init->{'vgetty'};
    if ($init->{'args'}) {
        $init->{'args'} =~ s/^\s+//;
        $cmd .= " $init->{'args'}";
        }
    if ($in{'tty'}) {
        $cmd .= " $in{'tty'}";
        $init->{'tty'} = $in{'tty'};
        }
    else {
        -r $in{'other'} || &error($text{'vgetty_etty'});
        $cmd .= " $in{'other'}";
        $init->{'tty'} = $in{'other'};
        }
    $newtty = $init->{'tty'};
    $newtty = "/dev/$newtty" if ($newtty !~ /^\//);
    if ($in{'new'} || $newtty ne $oldtty) {
        # Check for tty clash
        foreach $v (&vgetty_inittabs()) {
            local $vtty = $v->{'tty'};
            $vtty = "/dev/$vtty" if ($vtty !~ /^\//);
            &error(&text('vgetty_eclash', "<tt>$vtty</tt>"))
                if ($vtty eq $newtty);
            }
        }
    $init->{'process'} = $cmd;

    if (defined($in{'rings_def'})) {
        $tf = &tty_opt_file($rings, $init->{'tty'});
        &lock_file($tf);
        if (!$in{'new'} && $oldtty ne $newtty) {
            unlink(&tty_opt_file($rings, $oldtty));
            }
        if ($in{'rings_def'}) {
            unlink($tf);
            }
        else {
            $in{'rings'} =~ /^\d+$/ ||
                &error($text{'vgetty_erings'});
            $in{'rings'} >= 2 || &error($text{'vgetty_erings2'});
            &open_tempfile(TF, ">$tf");
            &print_tempfile(TF, $in{'rings'},"\n");
            &close_tempfile(TF);
            }
        &unlock_file($tf);
        }

    if (defined($in{'ans_def'})) {
        $tf = &tty_opt_file($ans, $init->{'tty'});
        &lock_file($tf);
        if (!$in{'new'} && $oldtty ne $newtty) {
            unlink(&tty_opt_file($ans, $oldtty));
            }
        if ($in{'ans_def'}) {
            unlink($tf);
            }
        else {
            $mode = &parse_answer_mode("ans");
            $mode || &error($text{'vgetty_eans'});
            &open_tempfile(TF, ">$tf");
            &print_tempfile(TF, $mode,"\n");
            &close_tempfile(TF);
            }
        &unlock_file($tf);
        }
    
    if ($in{'new'}) {
        $maxid = 1;
        foreach $i (@inittab) {
            $maxid = $i->{'id'} if ($i->{'id'} =~ /^\d+$/ &&
                        $i->{'id'} > $maxid);
            }
        $init->{'id'} = $maxid + 1;
        $init->{'levels'} = [ 2, 3, 4, 5 ];
        $init->{'action'} = "respawn";
        &inittab::create_inittab($init);
        }
    else {
        &inittab::modify_inittab($init);
        }
    }
&unlock_file($inittab::config{'inittab_file'});
&webmin_log($in{'delete'} ? "delete" : $in{'new'} ? "create" : "modify",
        "vgetty", $init->{'tty'}, $init);

&redirect("list_vgetty.cgi");


:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0101 ]--