!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.23 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:     umShowMenu.php (5.01 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
$MnStID 
$_GET['MnStID'];
include_once(
"pagebody.php");
pageHeader();
$pageTitle="กำหนดเมนูระบบงาน";        // $StID";
?>
<table width=100% class="pageTitleBgColor" align="center">
<tr><td align=center><? echo $pageTitle?></td></tr>
</table>
<!--your code here-------------------------------------------------------------------------->
<br>
<?
include_once("clsUmSystem.php");
include_once(
"clsUmMenu.php");
$oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB'], $GLOBALS['USER'], $GLOBALS['PASSWORD']);
//-------------------------------------------
if ($_POST['method']=="updSeq") include_once("processUpdMenuSeq.php");
//-------------------------------------------
$oSt = new umSystem($oC);
    
$oSt->SearchByKey($MnStID);
    
$oSt->GetRecord();
    
$StName $oSt->StNameT;
    
$oSt->Close();
$oMnT = new umMenu($oC);
$oMn = new umMenu($oC);
$oT = new clsTable(array("เมนู""ดำเนินการ","ลำดับ"));
$oT->bgColor="#efefef";
$oT->headerBgColor="#dddddd";
$oT->align="center";
$oMnT->RSMainMenuBySt($MnStID);

$rw=0;

while (
$oMnT->GetRecord()){
    
ShowmenuM($oMnT->MnID);        
}
$oT->rowStart("","#dddddd");
$oT->addCell("");
$oT->addCell("<a href=\"umAddMenu.php?MnStID=$MnStID&Level=0&ParentMnID=\" ><img src=\"images/new.gif\" alt=\"เพิ่มหัวข้อเมนู\" border=\"0\"></a>");
$oT->addCell("<input type=button name=doSave value='บันทึก' onclick='doUpdateMenuSeq()'>""center");
$oT->rowEnd();

echo 
"<form name=formSeq method=post>";
echo 
"<input type=hidden name=method value=''>";
echo 
$oT->output();
echo 
"</form>";
//////////////////////////////////////////

function ShowMenuM($MnID){
    global 
$oC;
    global 
$oT;
    global 
$Str;
    global 
$rw;

    
//include_once("../class/clsDB.php");
    
$oMn  = new ummenu($oC);
    
$oMn->SearchByKey($MnID);
    
$oMn->GetRecord();
    
///////////////////////////////////////////////
//    if (!$oMn->hasSubMenu($oMn->MnID) and $oMn->MnLevel>=1){
//        if ($oMn->numMenuInSameParent($oMn->MnParentMnID)>1){
//            $mn = $oMn->getMinSeq($oMn->MnParentMnID);
//            $mx = $oMn->getMaxSeq($oMn->MnParentMnID);
//            $bnkimg=str_repeat("<td></td>", ($oMn->MnLevel-1)*2);
//            if ($mn<>$mx){
//                if ($oMn->MnSeq==$mn)
//                    $updown = $bnkimg . 
//                                "<a href=\"javascript:doUpDown('d', '$oMn->MnStID','$oMn->MnID', '$oMn->MnSeq', '$oMn->MnParentMnID', '$oMn->MnLevel')\">
//                                  <img src=\"images/down.gif\" border=\"0\"></a>";
//                elseif ($oMn->MnSeq==$mx)
//                    $updown = $bnkimg . 
//                                    "<a href=\"javascript:doUpDown('u', '$oMn->MnStID','$oMn->MnID', '$oMn->MnSeq', '$oMn->MnParentMnID', '$oMn->MnLevel')\">
//                                    <img src=\"images/up.gif\" border=\"0\"></a>";
//                else                    
//                    $updown = $bnkimg . 
//                                    "<a href=\"javascript:doUpDown('d', '$oMn->MnStID','$oMn->MnID', '$oMn->MnSeq', '$oMn->MnParentMnID', '$oMn->MnLevel')\">
//                                            <img src=\"images/down.gif\" border=\"0\"></a>
//                                            <a href=\"javascript:doUpDown('u', '$oMn->MnStID','$oMn->MnID', '$oMn->MnSeq', '$oMn->MnParentMnID', '$oMn->MnLevel')\">
//                                            <img src=\"images/up.gif\" border=\"0\"></a>";
//            }
//        }
//    }
    /////////////////////////////////////////////
    
if ($oMn->MnLevel==0){
        
$bs="<b>";    
        
$be="</b>";    
    }
    
$lv =  $oMn->MnLevel+1;
    
$oT->addRow(array(str_repeat("<img src=images/blank.gif>"$oMn->MnLevel*3). $bs .$oMn->MnNameT$be ,    
            
"<a href=\"umAddMenu.php?MnStID=$oMn->MnStID&Level=$lv&ParentMnID=$oMn->MnID\" >
                    <img src=\"images/new.gif\" alt=\"เพิ่มเมนู\" border=\"0\"></a>
                 <a href=\"javascript:doEditMenu('$oMn->MnStID','$oMn->MnID')\">
                     <img src=\"images/edit.gif\" alt=\"แก้ไข\"  border=\"0\"></a>
                 <a href=\"javascript:doDelete(document.form1, '$oMn->MnNameT', '$oMn->MnStID', '$MnID')\">
                    <img src=\"images/del.gif\" alt=\"ลบ\"  border=\"0\"></a>"
,
                
"<input type=hidden size=4  name='MnID[]'  value=\"$oMn->MnID\" readonly>" .
                
str_repeat("<img src=images/blank.gif>"$oMn->MnLevel*1) .
                
"<input type=text size=10 name='seq[]' value=\"$oMn->MnSeq\" style=text-align:center onKeypress='CheckNum(event.keyCode)'> "));    
    
$oMn->RSmenuByParentMn($MnID);
    while (
$oMn->GetRecord()){
        
ShowMenuM($oMn->MnID);
    }
}
?>
<br>
<!--------------------------------------------------------------------->
<? 
pageFooter
(); 
?>
<!--------------------------------------------------------------------->
<!--put javascript here-->
<script language="javascript">
function doEditMenu(StID, MnID){
    window.location="umEditMenu.php?MnStID=" + StID + "&MnID=" + MnID;    
}
function doDelete(f, txt, StID, MnID){
    if (confirm('ต้องการลบเมนู  ' + txt +  ' ใช่หรือไม่') ) {
        window.location="processUmMenu.php?method=delete&MnStID=" + StID + "&MnID=" + MnID;
    }
}
function doUpDown(ud, MnStID, MnID, MnSeq, PmnID, MnLevel){
    s='processUmMenu.php?method=updown&ud=' + ud + '&MnStID=' + MnStID + '&MnID=' + MnID + '&MnSeq=' + MnSeq + '&PmnID=' + PmnID + '&MnLevel=' + MnLevel;
    window.location= s;
}
function doUpdateMenuSeq(){
    document.formSeq.method.value='updSeq';
    document.formSeq.submit();
}

function CheckNum(xx){
    // . = 46   
    // 0..9 = 48-57
    //if (xx==46) return event.returnValue;
    if (xx < 48 || xx > 57) event.returnValue = false;
    return event.returnValue;
}
</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.0091 ]--