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


Viewing file:     regist_model.php (2.84 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

include_once("sa_model.php");

class 
Regist_model extends Sa_model {

    
// PK is cl_id

    
public $CurId;
    public 
$AcY;
    public 
$SyId;
    public 
$rgCurId;
    public 
$rgSyId;

    function 
Regist_model() {
        
parent::__construct();
    }

    function 
get_rgCur(){
        
/*
        $con = '';
        $con.=($this->AcY!='')? " AND rgAcY = $this->AcY" :'';
        $con.=($this->CurId!='')? " AND rgCurId = $this->CurId" :'';
        $con.=($this->SyId!='')? " AND rgSyId = $this->SyId" :'';

        $sql = "
            SELECT cur.*
            FROM $this->rg_dbname.rg_Regist
            INNER join $this->rg_dbname.rg_Curriculum cur ON rgCurId = curId
            where 1=1 
            $con
            group by rgAcY, rgCurId 
            order by rgAcY, rgCurId 
        ";
        */
        
$sql "
            SELECT *
            FROM $this->rg_dbname.rg_Curriculum
            where 1=1
        "
;
        
$query $this->db->query($sql);
        return 
$query;
    }

    function 
get_rgSy(){
        
/*
        $con = '';
        $con.=($this->AcY!='')? " AND rgAcY = $this->AcY" :'';
        $con.=($this->CurId!='')? " AND rgCurId = $this->CurId" :'';
        $con.=($this->SyId!='')? " AND rgSyId = $this->SyId" :'';

        $sql = "
            SELECT sy.*
            FROM $this->rg_dbname.rg_Regist
            INNER JOIN $this->rg_dbname.rg_StudyYear sy ON rgSyId = syId
            where 1=1 
            $con
            group by rgAcY, rgSyId 
            order by rgAcY, rgSyId 
        ";
        */
        
$sql "
            SELECT *
            FROM $this->rg_dbname.rg_StudyYear
            where 1=1 
        "
;
        
$query $this->db->query($sql);
        return 
$query;
    }

    
//  25/8/2554
    
function list_std($q=""){
        
/*
        $con = '';
        $con.=($this->rgAcY!='')?" AND rgAcY = $this->rgAcY":'';
        $con.=($this->rgCurId!='')?" AND rgCurId = $this->rgCurId":'';
        $con.=($this->rgSyId!='')?" AND rgSyId = $this->rgSyId":'';
        $sql = "
            SELECT std . *, rgSyId
            FROM $this->rg_dbname.rg_Regist
            INNER JOIN $this->rg_dbname.rg_Student std ON rgStdId = stdId
            WHERE 1=1 AND stdSstId = 1 
            $con
            GROUP BY rgStdId
            ";
            inner join $this->rg_dbname.rg_RegistDetails
                on stdId = rdStdId
        */
        
$sql "
            SELECT *
            FROM $this->rg_dbname.rg_Student

            WHERE 1=1 AND stdSstId = 1 
            "
;
        
$query $this->db->query($sql);
        return 
$query;
    }

    function 
get_acY(){
        
$sql "
            SELECT *
            FROM $this->rg_dbname.rg_TermConfig
            WHERE 1=1
            GROUP BY tmcAcY
            "
;
        
$query $this->db->query($sql);
        return 
$query;
    }
}

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