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


Viewing file:     processSelectDocPost.php (5.82 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 
"../class/clsDepartment.php";
include_once 
"../class/clsPerson.php";
include_once 
"../link/function.php";
include_once 
"../link/functionshow.php";
include_once 
"../class/clsDocuments.php";
include_once 
"funct.php";

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

$oDoc = new Documents($oC);


if(
$method=="selectdoc"){
    for(
$k=0;$k<$i;$k++){
        
//echo "IDDOC=".$check[$k]."<br>";
        //echo "SELECT=".$selectPost[$k]."<br>";
                
$oDoc->SearchByKey($check[$k]);
                
$oDoc->GetRecord();
                
$oDoc->Edit();
                
$oDoc->DocID=$oDoc->DocID;
                
$oDoc->DocPID=$oDoc->DocPID;
                
$oDoc->DlcID=$oDoc->DlcID;
                
$oDoc->PtID=$oDoc->PtID;
                
$oDoc->DtID=$oDoc->DtID;
                
$oDoc->DslID=$oDoc->DslID;
                
$oDoc->DclID=$oDoc->DclID;
                
$oDoc->DsID=$oDoc->DsID;
                
$oDoc->RsID=$oDoc->RsID;
                
$oDoc->DocDateCreate=$oDoc->DocDateCreate;
                
$oDoc->DocUserCreate=$oDoc->DocUserCreate;
                
$oDoc->DocTypeNo=$oDoc->DocTypeNo;
                
$oDoc->DocDate=$oDoc->DocDate;
                
$oDoc->DocNo=$oDoc->DocNo;
                
$oDoc->DocSubject=$oDoc->DocSubject;
                
$oDoc->DocFrom=$oDoc->DocFrom;
                
$oDoc->DocTo=$oDoc->DocTo;
                
$oDoc->DocShortDesc=$oDoc->DocShortDesc;
                
$oDoc->DocSpeedLevelDueDate=$oDoc->DocSpeedLevelDueDate;
                
$oDoc->DocStart=$oDoc->DocStart;
                
$oDoc->DocFinish=$oDoc->DocFinish;
                
$oDoc->DocGroup=$oDoc->DocGroup;
                
$oDoc->DocRef=$oDoc->DocRef;
                
$oDoc->DocCircular=$oDoc->DocCircular;
                
$oDoc->DocfCir=$oDoc->DocfCir;
                
$oDoc->DocOther=$oDoc->DocOther;
                
$oDoc->CertificatePs=$oDoc->CertificatePs;
                
$oDoc->fDelete=$oDoc->fDelete;
                
$oDoc->endDoc=$oDoc->endDoc;
                
$oDoc->sendToPs=$oDoc->sendToPs;
                
                
                if(
$AnIDselect[$k]!=$oDoc->AnID){
                
//echo "change AnID=$AnIDselect[$k]<br>";
                    
$oDoc->AnID=$AnIDselect[$k];
                    
$edit=1;
                    if(
$oDoc->DocPID=="0"){
                        
updateAnIDdocumentDocPID0($oDoc->DocID,$AnIDselect[$k]);    
                    }else{
                        
updateAnIDdocumentDocPID0($oDoc->DocPID,$AnIDselect[$k]);
                    }
                }else{
                    
$oDoc->AnID=$oDoc->AnID;
                }
                
                
$oDoc->DocRefAns=$oDoc->DocRefAns;
                
$oDoc->DocRefAnsID=$oDoc->DocRefAnsID;
                
$oDoc->DocstartDatePost=$oDoc->DocstartDatePost;
                
$oDoc->DocendDatePost=$oDoc->DocendDatePost;
                
$oDoc->DocMainPost=$oDoc->DocMainPost;
                
                if(
$selectPost[$k]!=$oDoc->DocGetPost){
                    
$oDoc->DocGetPost=$selectPost[$k];
                    
$edit=1;
                }else{
                    
$oDoc->DocGetPost=$oDoc->DocGetPost;
                }
                
                
//echo "DocShowInOut=".$DocShowInOut[$k]."and oDoc-DocShowInOut==".$oDoc->DocShowInOut."<br>";
                
if($DocShowInOut[$k]!=$oDoc->DocShowInOut){
                    
$oDoc->DocShowInOut=$DocShowInOut[$k];
                    
$edit=1;
                }else{
                    
$oDoc->DocShowInOut=$oDoc->DocShowInOut;
                }
                
                if(
$edit==1){
                    
$oDoc->DocDateGetPost=getNowDateTh()." ".date('H:i:s');
                }else{
                    
$oDoc->DocDateGetPost=$oDoc->DocDateGetPost;
                }
                
$oDoc->useMainDocNo=$oDoc->useMainDocNo;
                
$oDoc->DocforSign=$oDoc->DocforSign;
                
$oDoc->Save();
    }
    echo 
"<meta http-equiv='refresh' content='0; URL=selectDocPost.php?AnID=$AnID'>";
}else if(
$method=="changeSelectDoc"){
                
$oDoc->SearchByKey($DocID);
                
$oDoc->GetRecord();
                
$oDoc->Edit();
                
$oDoc->DocID=$oDoc->DocID;
                
$oDoc->DocPID=$oDoc->DocPID;
                
$oDoc->DlcID=$oDoc->DlcID;
                
$oDoc->PtID=$oDoc->PtID;
                
$oDoc->DtID=$oDoc->DtID;
                
$oDoc->DslID=$oDoc->DslID;
                
$oDoc->DclID=$oDoc->DclID;
                
$oDoc->DsID=$oDoc->DsID;
                
$oDoc->RsID=$oDoc->RsID;
                
$oDoc->DocDateCreate=$oDoc->DocDateCreate;
                
$oDoc->DocUserCreate=$oDoc->DocUserCreate;
                
$oDoc->DocTypeNo=$oDoc->DocTypeNo;
                
$oDoc->DocDate=$oDoc->DocDate;
                
$oDoc->DocNo=$oDoc->DocNo;
                
$oDoc->DocSubject=$oDoc->DocSubject;
                
$oDoc->DocFrom=$oDoc->DocFrom;
                
$oDoc->DocTo=$oDoc->DocTo;
                
$oDoc->DocShortDesc=$oDoc->DocShortDesc;
                
$oDoc->DocSpeedLevelDueDate=$oDoc->DocSpeedLevelDueDate;
                
$oDoc->DocStart=$oDoc->DocStart;
                
$oDoc->DocFinish=$oDoc->DocFinish;
                
$oDoc->DocGroup=$oDoc->DocGroup;
                
$oDoc->DocRef=$oDoc->DocRef;
                
$oDoc->DocCircular=$oDoc->DocCircular;
                
$oDoc->DocfCir=$oDoc->DocfCir;
                
$oDoc->DocOther=$oDoc->DocOther;
                
$oDoc->CertificatePs=$oDoc->CertificatePs;
                
$oDoc->fDelete=$oDoc->fDelete;
                
$oDoc->endDoc=$oDoc->endDoc;
                
$oDoc->sendToPs=$oDoc->sendToPs;
                
                if(
$AnIDselect[$DocID]!=$oDoc->AnID){
                    
$oDoc->AnID=$AnIDselect[$DocID];
                    
$edit=1;
                    if(
$oDoc->DocPID=="0"){
                        
updateAnIDdocumentDocPID0($oDoc->DocID,$AnIDselect[$DocID]);    
                    }else{
                        
updateAnIDdocumentDocPID0($oDoc->DocPID,$AnIDselect[$DocID]);
                    }
                }else{
                    
$oDoc->AnID=$oDoc->AnID;
                }
                
                
                
$oDoc->DocRefAns=$oDoc->DocRefAns;
                
$oDoc->DocRefAnsID=$oDoc->DocRefAnsID;
                
$oDoc->DocstartDatePost=$oDoc->DocstartDatePost;
                
$oDoc->DocendDatePost=$oDoc->DocendDatePost;
                
$oDoc->DocMainPost=$oDoc->DocMainPost;
                
                if(
$selectPost[$DocID]!=$oDoc->DocGetPost){
                    
$oDoc->DocGetPost=$selectPost[$DocID];
                    
$edit=1;
                }else{
                    
$oDoc->DocGetPost=$oDoc->DocGetPost;
                }
                
                if(
$DocShowInOut[$DocID]!=$oDoc->DocShowInOut){
                    
$oDoc->DocShowInOut=$DocShowInOut[$DocID];
                    
$edit=1;
                }else{
                    
$oDoc->DocShowInOut=$oDoc->DocShowInOut;
                }
                
                if(
$edit==1){
                    
$oDoc->DocDateGetPost=getNowDateTh()." ".date('H:i:s');
                }else{
                    
$oDoc->DocDateGetPost=$oDoc->DocDateGetPost;
                }
                
$oDoc->useMainDocNo=$oDoc->useMainDocNo;
                
$oDoc->DocforSign=$oDoc->DocforSign;
                
$oDoc->Save();
                
//echo $selectPost[$DocID];
            
echo "<meta http-equiv='refresh' content='0; URL=editSelectDocPost.php?DocSubject=$DocSubject&DocNo=$DocNo&start=$start&end=$end&yearDoc=$yearDoc&AnID=$AnID'>";         
}
?>

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