JEMBOT MAWOT Bypass Shell

Current Path : /home/cinepatreb/billetterie/modules/selltickets/
Upload File :
Current File : /home/cinepatreb/billetterie/modules/selltickets/functions.app.php

<?php
/**
 * Sell Tickets module for Prestashop by Avellana Digital
 *
 * @author    Avellana Digital SL
 * @copyright Copyright (c) 2019 Avellana Digital - www.avellanadigital.com
 * @license   Commercial license
 * @version    4.0.0
 */

include(getcwd().'/../../config/config.inc.php');
include(getcwd().'/selltickets.php');

header('Content-Type: application/javascript');

if (!defined('_PS_VERSION_')) { exit; }

if (Tools::getValue('action') && Tools::getValue('key')) {
    if ((Tools::getValue('action') == 'getAccess' || Tools::getValue('action') == 'getValidation')
        && Tools::strlen(Tools::getValue('key')) == 10) {
        $selltickets = new SellTickets();
        $data = array();

        if (Tools::getValue('action') == 'getAccess') {
            $key = Tools::getValue('key');
            $real_key = Configuration::get('selltickets_appkey');

            if (isset($key) && $key == $real_key) {
                $data['status'] = 'ok';
            } else {
                $data['status'] = 'ko';
            }

            echo Tools::getValue('callback').'('.json_encode($data).')';
        }

        if (Tools::getValue('action') == 'getValidation') {
            $key = Tools::getValue('key');
            $real_key = Configuration::get('selltickets_appkey');

            if (isset($key) && $key == $real_key) {
                $scan = Tools::getValue('scanned');
                $data = $selltickets->validateTicket($scan);
            } else {
                $data['status'] = 'ko';
            }

            echo Tools::getValue('callback').'('.json_encode($data).')';
        }
    } else {
        return false;
    }
} else {
    return false;
}

xxxxx1.0, XXX xxxx