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


Viewing file:     status_monitor.pl (3.09 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |

do 'smart-status-lib.pl';

# status_monitor_list()
# Just one type is supported
sub status_monitor_list
{
if (&has_command($config{'smartctl'})) {
    return ( [ "smart", $text{'monitor_type'} ] );
    }
else {
    return ( );
    }
}

# status_monitor_status(type, &monitor, from-ui)
# Check the drive status
sub status_monitor_status
{
local @drives = &list_smart_disks_partitions();
local ($d) = grep { ($_->{'device'} eq $_[1]->{'drive'} ||
             $_->{'id'} eq $_[1]->{'drive'}) &&
            $_->{'subdisk'} eq $_[1]->{'subdisk'} } @drives;
if (!$d) {
    # Not in list?!
    return { 'up' => -1,
         'desc' => $text{'monitor_nosuch'} };
    }
local $st = &get_drive_status($d->{'device'}, $d);

# Record number of errors since last time
local %errors;
local $errors_file = "$module_config_directory/last-errors";
&read_file($errors_file, \%errors);
local %lasterrors = %errors;
$errors{$_[1]->{'drive'}} = $st->{'errors'};
&write_file($errors_file, \%errors);

if (!$st->{'support'} || !$st->{'enabled'}) {
    # SMART not enabled on device
    return { 'up' => -1,
         'desc' => $text{'monitor_nosmart'} };
    }
elsif (!$st->{'check'}) {
    # Check failed
    return { 'up' => 0 };
    }
elsif ($st->{'errors'} && $_[1]->{'errors'} == 1) {
    # Errors found, and failing on any errors
    return { 'up' => 0,
         'value' => $st->{'errors'},
         'desc' => &text('monitor_errorsfound', $st->{'errors'}) };
    }
elsif ($st->{'errors'} && $_[1]->{'errors'} == 2 &&
       $st->{'errors'} > $lasterrors{$_[1]->{'drive'}}) {
    # Errors found and have increased
    return { 'up' => 0,
         'value' => $st->{'errors'},
         'desc' => &text('monitor_errorsinced', $st->{'errors'},
                 $lasterrors{$_[1]->{'drive'}}) };
    }
else {
    # All OK!
    return { 'up' => 1,
         'value' => $st->{'errors'} };
    }
}

# status_monitor_dialog(type, &monitor)
# Return form for selecting a drive
sub status_monitor_dialog
{
local $rv;
local @drives = &list_smart_disks_partitions();
local ($inlist) = grep { ($_->{'device'} eq $_[1]->{'drive'} ||
              $_->{'id'} eq $_[1]->{'drive'}) &&
                 $_->{'subdisk'} eq $_[1]->{'subdisk'} } @drives;
$inlist = 1 if (!$_[1]->{'drive'});
$rv .= &ui_table_row($text{'monitor_drive'},
      &ui_select("drive",
         !$_[1]->{'drive'} ? $drives[0]->{'device'} :
         $inlist ? ($inlist->{'id'} || $inlist->{'device'}).':'.
                 $inlist->{'subdisk'} :
               undef,
         [ (map { [ ($_->{'id'} || $_->{'device'}).':'.$_->{'subdisk'},
               $_->{'desc'}.($_->{'model'} ?
                " ($_->{'model'})" : "") ] } @drives),
           [ "", $text{'monitor_other'} ] ]).
      &ui_textbox("other", $inlist ? "" : $_[1]->{'drive'}, 15), 3);

$rv .= &ui_table_row($text{'monitor_errors'},
    &ui_radio("errors", $_[1]->{'errors'} || 0,
        [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ],
          [ 2, $text{'monitor_errorsinc'} ] ]));
return $rv;
}

# status_monitor_parse(type, &monitor, &in)
# Parse form for selecting a rule
sub status_monitor_parse
{
if ($_[2]->{'drive'}) {
    ($_[1]->{'drive'}, $_[1]->{'subdisk'}) = split(/:/, $_[2]->{'drive'});
    }
else {
    $_[1]->{'drive'} = $_[2]->{'other'};
    $_[1]->{'subdisk'} = undef;
    $_[1]->{'drive'} =~ /^\S+$/ || &error($text{'monitor_edrive'});
    }
$_[1]->{'errors'} = $_[2]->{'errors'};
}

1;


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