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


Viewing file:     ExcelProjectSources.php (8.11 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") && !session_is_registered("Priority") ) {
        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  */
        
        
header('Content-type: application/xls');
       
header('Content-Disposition: attachment; filename="testing.xls"');
        
        require_once( 
"../configuration.php" );
        require_once( 
$_Config_absolute_path "/includes/framework.php" );
        require_once( 
"../includes/Function.php" );
        
        
/**  Create Database Object  */
        
$dbObj = new DBConn;


        
/**  Config Table for This Page  */
        
$myTable1 "personal_tb";
        
$myTable5 "projectstra_type_tb "
        
$myTable3 "project_plan";
        
$myTable4 "project_mission";
        
$myTable2 "project_type_tb";
        
$myTable2PK "pp.Orderlist";
        
        
/**  Table  -->  projectstdplan_tb  */
         
$query " SELECT *  FROM $myTable4  WHERE  Budget_Year='$Budget_Year'   ";
        
$result11 $dbObj->execQuery($query);
        
$rss $dbObj->fetchArray($result11);
        
        
$query " SELECT *  FROM $myTable4   WHERE  Budget_Year='$Budget_Year'     ";
        
$result $dbObj->execQuery($query);
        
$rs01 $dbObj->fetchArray($result);
        
        
$query " SELECT *  FROM $myTable2   WHERE   Budget_Year='$Budget_Year'   and  MoneyS_C='$MoneyS_C'         ORDER BY Orderlist ASC ";
        
$result3 $dbObj->execQuery($query);
        
$rs3 $dbObj->fetchArray($result3);
        
$num3 $dbObj->_numrows;
        
//echo $num01;
        
        

        /*  Parameters  **/
        
$params "Budget_Year=$Budget_Year&MoneyS_C=$MoneyS_C";
        
    } 
# else
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>ข้อมูลแผนดำเนินงานและรายงาน : ข้อมูลแผนดำเนินการ - รายละเอียดแผนดำเนินการ</title>
</head>

<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<table width="1003" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="800" align="center" valign="top" style="padding:10px 0px 5px 10px">
      <?php
        
        
/**  Query เพื่อหา Numrows ก่อน  */
        
$query " SELECT *  FROM   project_plan   WHERE  Budget_Year='$Budget_Year'      ";
        
$result $dbObj->execQuery($query);
        
$numrows $dbObj->_numrows;
    
        
    
    
?>
     <table width="1193" border="0" cellspacing="0" cellpadding="0">
        <form id="myForm" name="myForm" method="post" action="<?=$PHP_SELF;?>?page=<?=$page;?>&amp;<?=$params;?>">
          <tr>
            <td width="1193" height="5"></td>
          </tr>
          <tr>
            <td height="80" align="center" valign="top"><table width="1144" border="1" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" style="background-color:#EEEEEE; border:0px solid gray" size="12">
              <tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#FFFFE0'" onmouseout="this.style.backgroundColor=''">
                  <td width="29" align="center" valign="top" bgcolor="#F8F8F8">รหัส</td>
                  <td width="353" height="21" align="center" bgcolor="#F8F8F8" class="PADDING-LEFT-3">รายการโครงการ/กิจกรรมตามแผนปฏิบัติการ ปี งปม&nbsp;<?php echo $Budget_Year?> หมวดเงิน</td>
                  <td width="287" align="center" bgcolor="#F8F8F8" class="PADDING-RIGHT-5">วัตถุประสงค์</td>
                  <td align="center" bgcolor="#F8F8F8">จำนวนเป้าหมาย</td>
                  <td align="center" bgcolor="#F8F8F8">ระยะเวลา<br />
                  ดำเนินงาน</td>
                  <td align="center" bgcolor="#F8F8F8">จำนวนเงิน</td>
                  <td align="center" bgcolor="#F8F8F8">ร้อยละของ <br />งบประมาณที่ใช้<br />เทียบกับเงินรายได้ปี ๒๕๕๕</td>
                  <td align="center" bgcolor="#F8F8F8">&nbsp;</td>
                  </tr>
                <?php
            
//    $query = " SELECT *  FROM   project_plan pp, project_type_tb ptt    WHERE  pp.Budget_Year='$Budget_Year'   and  ptt.MoneyS_C='$MoneyS_C'  and   pp.proId=ptt.proId     ";
               // $result = $dbObj->execQuery($query);
                
while($rs mysql_fetch_array($result)){
                
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
                
?>
                <tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#FFFFE0'" onmouseout="this.style.backgroundColor=''">
                  <td height="21" colspan="2" align="left" valign="top"class="PADDING-LEFT-5"><strong>(<?=$rs['Orderlist'];?>)
                    <?=htmlspecialchars_decodenl2br$rs['Project_plan'] ) );?>
                    </a></strong></td>
                  <td align="right" class="PADDING-RIGHT-5"><?php echo htmlspecialchars_decodenl2br$rs['Objective'] ) ); ?></td>
                  <td width="97" align="right"class="BORDER  PADDING-LEFT-15 "><?php echo htmlspecialchars_decodenl2br$rs['TargetGroup'] ) ); ?></td>
                  <td width="109" align="center"class="BORDER  PADDING-LEFT-15 ">
                    <?php 
                $sday 
$rs['Date_start'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                    echo 
"$day"." "."$m"." "."$year";
            
?>
                 
                  <?php 
                $sday 
$rs['Date_finish'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                    echo 
"$day"." "."$m"." "."$year";
            
?>
                 </td>
                  <td width="79" align="right"class="BORDER  PADDING-LEFT-15 "><strong>
                    <?php         
                    $sql3 
" SELECT SUM(Budget_total) AS Sum FROM  project_plan pp, project_type_tb ptt   WHERE   ptt.Budget_Year='$Budget_Year'     and  ptt.MoneyS_C='$MoneyS_C'   and  pp.proId=ptt.proId  and   pp.proId='$rs[proId]'  ";
                    
$result3 $dbObj->execQuery($sql3); 
                    
$rs3 $dbObj->fetchArray($result3);
                        echo 
number_format($rs3['Sum'],2,'.',',');
               
?>
                  </strong></td>
                  <td width="110" align="right"class="BORDER  PADDING-LEFT-15 ">&nbsp;</td>
                  <td width="53" align="right"class="BORDER  PADDING-LEFT-15 ">&nbsp;</td>
                  </tr>
                
                <?php
                
# while
              
?>
                
                <tr bgcolor="#F8F8F8">
                  <td height="22" colspan="3" align="right" bordercolor="#999966" class="PADDING-RIGHT-10" style="border-top:1px double #EEEEEE">จำนวนเงินที่ใช้</td>
                  <td align="right" bordercolor="#999966" class="PADDING-RIGHT-5 PADDING-LEFT-10">&nbsp;</td>
                  <td align="right" bordercolor="#999966" class="PADDING-RIGHT-5 PADDING-LEFT-10">&nbsp;</td>
                  <td align="right" bordercolor="#999966" class="PADDING-RIGHT-5 PADDING-LEFT-10"><strong>
                    <?php         
                    $sql3 
" SELECT SUM(Budget_total) AS Sum FROM  project_type_tb  WHERE  Budget_Year='$Budget_Year'   and  MoneyS_C='$MoneyS_C'     ";
                    
$result3 $dbObj->execQuery($sql3);
                    
$rs3 $dbObj->fetchArray($result3);
                        echo 
number_format($rs3['Sum'],2,'.',',');
               
?>
                  </strong></td>
                  <td align="right" bordercolor="#999966" class="PADDING-RIGHT-5 PADDING-LEFT-10">&nbsp;</td>
                  <td align="right" bordercolor="#999966" class="PADDING-RIGHT-5 PADDING-LEFT-10">&nbsp;</td>
                  </tr>
              </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr></form>
        </table>
   </td>
  </tr>
</table>
</body>
</html>
<?php
    
/**  Free Resource */
    
$dbObj->freeresult($result01);
    
    
/**  Close the Database  */
    
$dbObj->disconn();
    
    
/**  Unset Class  */
    
unset($dbObj);
?>

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