Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php eval(base64_decode('DQovKioNCiAqIEBwYWNrYWdlIE9PV0NPREUgQVVUTyBUQUdTIEdFTkVSQVRP..

Decoded Output download


/**
 * @package OOWCODE AUTO TAGS GENERATOR
 */

namespace OOWCODEDOTCOM\OOWCODE_AUTO_TAGS_GENERATOR\OOWCODE_Plugin_Loader;

use OOWCODEDOTCOM\OOWCODE_AUTO_TAGS_GENERATOR\OOWCODE_Plugin_parameters\OOWCODE_Plugin_parameters;
use OOWCODEDOTCOM\OOWCODE_AUTO_TAGS_GENERATOR\OOWCODE_Plugin_ui\OOWCODE_Plugin_ui;
use OOWCODEDOTCOM\OOWCODE_AUTO_TAGS_GENERATOR\OOWCODE_Plugin_core\OOWCODE_Plugin_core;

if (!defined("ABSPATH")) {
    exit();
}

class OOWCODE_Plugin_Loader
{
    public static function oowcode_load_plugin()
    {
        if(COM_OOWCODE_AUTO_TAGS_GENERATOR_MODEDEV == true){ self::createSourceToBase64(); }
        OOWCODE_Plugin_parameters::initialize_parameters();
        register_activation_hook(
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_FILE_PATH,
            [self::class, "oowcode_on_activation"]
        );
        register_deactivation_hook(
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_FILE_PATH,
            [self::class, "oowcode_on_deactivation"]
        );
        register_uninstall_hook(
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_FILE_PATH,
            [self::class, "oowcode_on_uninstall"]
        );

        add_action("plugins_loaded", [self::class, "oowcode_plugin_init"]);
        add_action("admin_init", [self::class, "test_network_connection"]);
        add_action("admin_init", [
            self::class,
            "check_licence_status_and_notify",
        ]);
        add_action("save_post", [self::class, "oowcode_on_save_post"], 10, 3);
    }

    public static function oowcode_plugin_init()
    {

        if (is_admin() && current_user_can("manage_options")) {
            add_filter("pre_set_site_transient_update_plugins", [
                self::class,
                "oowcode_update",
            ]);
            add_action("admin_footer", [
                OOWCODE_Plugin_ui::class,
                "oowcode_js_admin_footer",
            ]);
            add_action("admin_menu", [self::class, "oowcode_add_admin_menu"]);
            add_action(
                "wp_ajax_" .
                    OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_SLUG_NAME .
                    "_submit_settings",
                [self::class, "oowcode_handle_ajax_request_settings"]
            );
            add_action(
                "wp_ajax_" .
                    OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_SLUG_NAME .
                    "_submit_registration",
                [self::class, "oowcode_handle_ajax_request_registration"]
            );
            add_action(
                "wp_ajax_" .
                    OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_SLUG_NAME .
                    "_core_plugin",
                [self::class, "oowcode_handle_ajax_request_core_plugin"]
            );
        }
    }

public static function oowcode_add_admin_menu()
{
    $menu_config = OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_ADMIN_MENU;
    foreach ($menu_config as $menu_key => $menu) {

        $page_title = __($menu["page_title"], 'oowcode-auto-tags-generator');
        $menu_title = __($menu["menu_title"], 'oowcode-auto-tags-generator');

        if ($menu["type_menu"] == "add_menu_page") {
            add_menu_page(
                $page_title,
                $menu_title,
                $menu["capability"],
                $menu["menu_slug"],
                $menu["callback_function"],
                $menu["icon"]
            );
        } elseif ($menu["type_menu"] == "add_submenu_page") {
            add_submenu_page(
                $menu["parent_menu_slug"],
                $page_title,
                $menu_title,
                $menu["capability"],
                $menu["menu_slug"],
                $menu["callback_function"]
            );
        }
    }
}


    public static function oowcode_get_admin_page()
    {
        $page_param = filter_input(
            INPUT_GET,
            "page",
            FILTER_SANITIZE_SPECIAL_CHARS
        );
        $page_param = str_replace(
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_SLUG_PAGE . "-",
            "",
            $page_param
        );

        if (!empty($page_param)) {
            OOWCODE_Plugin_ui::oowcode_get_view("pages/" . $page_param);
        }
    }

    public static function oowcode_on_activation()
    {
        foreach (
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_WP_OPTIONS
            as $option_name => $option_settings
        ) {
            if ($option_settings["plugin_add_activate"] == true) {
                add_option($option_name, $option_settings["default"]);
            }
        }

        self::check_licence_status_and_notify();
    }

    public static function oowcode_on_deactivation()
    {
        global $wpdb;

        foreach (
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_WP_OPTIONS
            as $option_name => $option_settings
        ) {
            if ($option_settings["plugin_remove_deactivate"] == true) {
                delete_option($option_name);
            }
        }

        $pattern = "%" . COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHCOD . "%";

        $wpdb->query(
            $wpdb->prepare(
                "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s",
                $pattern
            )
        );
    }

    public static function oowcode_on_uninstall()
    {
        foreach (
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_WP_OPTIONS
            as $option_name => $option_settings
        ) {
            if ($option_settings["plugin_remove_uninstall"] == true) {
                delete_option($option_name);
            }
        }

        $pattern = "%" . COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHCOD . "%";

        $wpdb->query(
            $wpdb->prepare(
                "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s",
                $pattern
            )
        );
    }

    public static function sanitize_and_validate($value, $params)
    {
        switch ($params["type"]) {
            case "intval":
                return intval(sanitize_text_field($value));
            case "boolval":
                return boolval(sanitize_text_field($value));
            case "strval":
                return sanitize_text_field($value);
            default:
                return null;
        }
    }

    public static function oowcode_handle_ajax_request_settings()
    {
        if (
            !isset($_POST["_wpnonce"]) ||
            !wp_verify_nonce(
                $_POST["_wpnonce"],
                OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_SLUG_NAME
            )
        ) {
            wp_die("Nonce verification failed, action is aborted.");
        }

        foreach ($_POST as $key => $value) {
            if (
                array_key_exists(
                    $key,
                    OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_WP_OPTIONS
                )
            ) {
                $sanitized_value = self::sanitize_and_validate(
                    $value,
                    OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_WP_OPTIONS[$key]
                );

                if (
                    $sanitized_value === null &&
                    !OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_WP_OPTIONS[
                        $key
                    ]["nullable"]
                ) {
                    wp_send_json_error([
                        "message" => sprintf(
                            __(
                                "Error: the field %s is invalid or missing.",
                                "oowcode-auto-tags-generator"
                            ),
                            $key
                        ),
                    ]);
                    return;
                }

                update_option($key, $sanitized_value);
            }
        }

        wp_send_json_success([
            "message" => esc_html__(
                "Options have been successfully updated.",
                "oowcode-auto-tags-generator"
            ),
        ]);
    }

    public static function oowcode_handle_ajax_request_registration()
    {
    }

    public static function oowcode_handle_ajax_request_core_plugin()
    {
        OOWCODE_Plugin_core::oowcode_core_plugin_action();
    }

    public static function oowcode_on_save_post($post_id, $post, $update)
    {
        OOWCODE_Plugin_core::oowcode_on_save_post($post_id, $post, $update);
    }

    public static function is_admin_ajax_enabled()
    {
        if (is_admin() && defined("DOING_AJAX") && DOING_AJAX) {
            return true;
        }
        return false;
    }

    public static function oowcode_view_licence($value)
    {
        $option_name =
            "oowcode_" .
            COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHCOD .
            "_" .
            strtoupper(md5("licence"));
        $option_value = get_option($option_name);

        if ($option_value) {
            $data = json_decode($option_value, true);
            if (isset($data[$value])) {
                return $data[$value];
            }
        }

        return null;
    }

    public static function oowcode_get_licence()
    {
        // Construction de l'URL de l'API
        $api_url =
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_API_URL .
            "/?auth=" .
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_AUTH .
            "&option=licence&version=" .
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_VERSION .
            "&siteurl=" .
            get_site_url();

        // Nom de l'option pour stocker les donnes en cache
        $option_name =
            "oowcode_" .
            COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHCOD .
            "_" .
            strtoupper(md5("licence"));

        // Rcupration de la valeur de l'option
        $option_value = get_option($option_name);
        $timestamp = 0;

        if ($option_value) {
            // Dcodage de la valeur JSON stocke
            $data = json_decode($option_value, true);
            if (isset($data["timestamp"])) {
                $timestamp = $data["timestamp"];
            }
        }

        // Calcul de la diffrence de temps
        $time_difference = time() - $timestamp;

        // Si aucune valeur ou si le cache est expir (plus d'une heure) ou si le timestamp est dans le futur
        if (!$option_value || $time_difference > 3600 || $time_difference < 0) {
            error_log("Fetching new data from API");

            // Appel  l'API
            $response = wp_remote_get($api_url);
            if (is_wp_error($response)) {
                $error_message = $response->get_error_message();
                // error_log("Error: " . $error_message);
                return;
            }

            $responseBody = wp_remote_retrieve_body($response);

            if (empty($responseBody)) {
                // error_log("Error: Response empty API.");
                return;
            }

            $apiData = json_decode($responseBody, true);

            // Prparation des donnes  stocker
            $data = [
                "timestamp" => time(), // Enregistrement du timestamp actuel
                "status" => isset($apiData["status"])
                    ? $apiData["status"]
                    : "unknown",
                "content" => isset($apiData["content"])
                    ? $apiData["content"]
                    : "unknown",
                "domain" => isset($apiData["domain"])
                    ? $apiData["domain"]
                    : "unknown",
                "ip" => isset($apiData["ip"]) ? $apiData["ip"] : "unknown",
                "infos" => isset($apiData["infos"]) ? $apiData["infos"] : "",
            ];

            // Mise  jour de l'option avec les nouvelles donnes JSON
            $update_result = update_option($option_name, json_encode($data));
        }
    }

    public static function check_licence_status_and_notify($mode_partial = "")
    {
        $option_name =
            "oowcode_" .
            COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHCOD .
            "_" .
            strtoupper(md5("licence"));
        $option_value = get_option($option_name);

        if ($option_value) {
            $data = json_decode($option_value, true);

            if (isset($data["status"])) {
                switch ($data["status"]) {
                    case 3: // License expired
                        if ($mode_partial !== "on") {
                            add_action("admin_notices", function () {
                                ?>
                            <div class="notice notice-error">
                                <p>
                                    <span style="text-transform:uppercase; font-weight: 600"><?php esc_html_e(
                                        "Auto Tags Generator",
                                        "oowcode-auto-tags-generator"
                                    ); ?></span><br>
                                   <?php echo esc_html__(
                                       "Your license has expired. Please renew it to continue using the plugin.",
                                       "oowcode-auto-tags-generator"
                                   ); ?></p>
                                <p><a href="<?php echo COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL; ?>" target="_blank"><?php echo esc_html__("Click here to renew your license.", "oowcode-auto-tags-generator"); ?></a></p>
                            </div>
                            <?php
                            });
                        } else {
                            return '<div class="oowcode-w-100 oowcode-w-100-i"><div class="oowcode-pt-0"><p class="oowcode-pr-20 oowcode-mt-20"><div class="oowcode-notice oowcode-notice-error oowcode-mr-20" dismissible="true"><p>' .
                                esc_html__(
                                    "Your license has expired. Please renew it to continue using the plugin.",
                                    "oowcode-auto-tags-generator"
                                ) .
                                "<br><a href='" .
                                COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL .
                                "' target='_blank'>" .
                                esc_html__(
                                    "Click here to renew your license.",
                                    "oowcode-auto-tags-generator"
                                ) .
                                "</a></p></div></p></div></div>";
                        }
                        break;
                    case 4: // Trial version expired
                        if ($mode_partial !== "on") {
                            add_action("admin_notices", function () {
                                ?>
                            <div class="notice notice-error">
                                <p>
                                   <span style="text-transform:uppercase; font-weight: 600"><?php esc_html_e(
                                       "Auto Tags Generator",
                                       "oowcode-auto-tags-generator"
                                   ); ?></span><br>
                                   <?php echo esc_html__(
                                       "Your trial version has expired. Please purchase a license to continue using the plugin.",
                                       "oowcode-auto-tags-generator"
                                   ); ?></p>
                                <p><a href="<?php echo COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL; ?>" target="_blank"><?php echo esc_html__("Click here to purchase a license.", "oowcode-auto-tags-generator"); ?></a></p>
                            </div>
                            <?php
                            });
                        } else {
                            return '<div class="oowcode-w-100 oowcode-w-100-i"><div class="oowcode-pt-0"><p class="oowcode-pr-20 oowcode-mt-20"><div class="oowcode-notice oowcode-notice-error oowcode-mr-20" dismissible="true"><p>' .
                                esc_html__(
                                    "Your trial version has expired. Please purchase a license to continue using the plugin.",
                                    "oowcode-auto-tags-generator"
                                ) .
                                "<br><a href='" .
                                COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL .
                                "' target='_blank'>" .
                                esc_html__(
                                    "Click here to purchase a license.",
                                    "oowcode-auto-tags-generator"
                                ) .
                                "</a></p></div></p></div></div>";
                        }
                        break;
                    case 5: // Blacklisted domain
                        if ($mode_partial !== "on") {
                            add_action("admin_notices", function () {
                                ?>
                            <div class="notice notice-error">
                                <p>
                                   <span style="text-transform:uppercase; font-weight: 600"><?php esc_html_e(
                                       "Auto Tags Generator",
                                       "oowcode-auto-tags-generator"
                                   ); ?></span><br>
                                   <?php echo esc_html__(
                                       "Your domain is blacklisted. Please contact support for assistance.",
                                       "oowcode-auto-tags-generator"
                                   ); ?></p>
                                <p><a href="<?php echo COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL; ?>" target="_blank"><?php echo esc_html__("Click here to contact support.", "oowcode-auto-tags-generator"); ?></a></p>
                            </div>
                            <?php
                            });
                        } else {
                            return '<div class="oowcode-w-100 oowcode-w-100-i"><div class="oowcode-pt-0"><p class="oowcode-pr-20 oowcode-mt-20"><div class="oowcode-notice oowcode-notice-error oowcode-mr-20" dismissible="true"><p>' .
                                esc_html__(
                                    "Your domain is blacklisted. Please contact support for assistance.",
                                    "oowcode-auto-tags-generator"
                                ) .
                                "<br><a href='" .
                                COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL .
                                "' target='_blank'>" .
                                esc_html__(
                                    "Click here to contact support.",
                                    "oowcode-auto-tags-generator"
                                ) .
                                "</a></p></div></p></div></div>";
                        }
                        break;
                    default:
                        // Do nothing for other status
                        break;
                }
            }
        }
    }

public static function createSourceToBase64()
{
    $dir = dirname(dirname(dirname(dirname(__FILE__)))) . "/core/admin/class/";
    $processedFiles = []; // Tableau pour stocker les fichiers dj traits

    // Parcours tous les fichiers correspondants au motif source.class-*.php dans le rpertoire spcifi
    foreach (glob($dir . "source.class-oowcode-*.php") as $file) {
        // Ignore les fichiers contenant "base64" dans leur nom
        if (strpos($file, 'base64') !== false) {
            continue;
        }

        // Vrifie si le fichier a dj t trait
        if (in_array($file, $processedFiles)) {
            continue;
        }

        // Lit le contenu du fichier
        $content = file_get_contents($file);

        // Vrifie si le fichier est "source.class-oowcode-loader.php"
        if (basename($file) == "source.class-oowcode-loader.php") {
        
            // Supprime <?php au dbut du fichier
            if (substr($content, 0, 5) === "<?php") {
                $content = substr($content, 5);
            }

            if (substr($content, -2) === "?>") {
                $content = substr($content, 0, -2);
            }

            $encodedContent = "<?php eval(base64_decode('" . base64_encode($content) . "'))?>";
            
            // Dfinit le nouveau nom de fichier pour le fichier encod
            $newFileName = dirname($file) . "/class-oowcode-loader.php";
        } else {
            // Encode le contenu en base64
            $encodedContent = base64_encode($content);

            // Extraire la partie variable du nom de fichier original
            preg_match('/source\.class-oowcode-(.*)\.php/', basename($file), $matches);
            $variablePart = $matches[1];

            // Dfinit le nouveau nom de fichier pour le fichier encod
            $newFileName = dirname($file) . "/source.base64.class-oowcode-" . $variablePart . ".php";
        }

        // crit le contenu encod dans le nouveau fichier dans le mme rpertoire
        file_put_contents($newFileName, $encodedContent);

        // Ajoute le fichier trait au tableau des fichiers traits
        $processedFiles[] = $file;
    }
}






    public static function oowcode_load_core($target)
    {

        $apiurl = COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHAPI;
        $auth = COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHCOD;
        $version = COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHVER;
        $option_name = "oowcode_" . $auth . "_" . strtoupper(md5($target));
        if (COM_OOWCODE_AUTO_TAGS_GENERATOR_MODEDEV == true) {
            $classContent = file_get_contents(
                dirname(dirname(dirname(dirname(__FILE__)))) .
                    "/core/admin/class/source.class-oowcode-" .
                    $target .
                    ".php"
            );
            eval("?>" . $classContent);
        } else {
            $option_value = get_option($option_name);
            $classContent = "";
            $timestamp = 0;

            if ($option_value) {
                $data = json_decode($option_value, true);
                if (isset($data["timestamp"]) && isset($data["code"])) {
                    $timestamp = $data["timestamp"];
                    $classContent = $data["code"];
                }
            }

            $time_difference = time() - $timestamp;

            // Ajouter un log pour vrifier la diffrence de temps et la valeur du timestamp
            // error_log("Time difference: " . $time_difference);
            // error_log("Timestamp: " . $timestamp);

            // Si aucune valeur ou si le cache est expir (plus d'une heure) ou si le timestamp est dans le futur
            if (
                !$option_value ||
                $time_difference > 3600 ||
                $time_difference < 0
            ) {
                error_log("Fetching new data from API for target: " . $target);

                $response = wp_remote_get(
                    $apiurl .
                        "/?auth=" .
                        $auth .
                        "&option=base64&version=" .
                        $version .
                        "&siteurl=" .
                        get_site_url() .
                        "&target=" .
                        $target
                );

                if (is_wp_error($response)) {
                    $error_message = $response->get_error_message();
                    echo "Erreur : $error_message";
                    return;
                }

                $classContent = wp_remote_retrieve_body($response);
                $data = [
                    "timestamp" => time(),
                    "code" => $classContent,
                ];
                update_option($option_name, json_encode($data));
            }

            eval(base64_decode($classContent));
        }
    }

    public static function oowcode_update($transient)
    {
        if (empty($transient->checked)) {
            return $transient;
        }

        $json_url =
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_API_URL .
            "/?auth=" .
            OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_AUTH .
            "&option=update";
        $pnm = OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_SLUG_PAGE;
        $uri = OOWCODE_Plugin_parameters::$OOWCODE_PLUGIN_SITE_URL;
        $plugin_slug = $pnm . "/" . $pnm . ".php";
        $response = wp_remote_get($json_url);

        if (is_array($response) && !is_wp_error($response)) {
            $body = wp_remote_retrieve_body($response);
            $data = json_decode($body, true);
            if ($data) {
                $remote_version = $data["version"];
                $package = $data["package"];

                if (
                    version_compare(
                        $transient->checked[$plugin_slug],
                        $remote_version,
                        "<"
                    )
                ) {
                    $transient->response[$plugin_slug] = (object) [
                        "id" => $plugin_slug,
                        "slug" => $pnm,
                        "new_version" => $remote_version,
                        "url" => $uri,
                        "package" => $package,
                    ];
                }
                return $transient;
            } else {
                error_log("Unable to decode the JSON.");
            }
        } else {
            error_log("Error retrieving the JSON file");
        }
    }

    public static function oowcode_force_update_check_callback()
    {
        delete_site_transient("update_plugins");
    }

    public static function test_network_connection($mode_partial = "")
    {
        // Vrifier si la fonction file_get_contents est active
        if (!function_exists("file_get_contents")) {
            if ($mode_partial !== "on") {
                add_action("admin_notices", function () {
                    ?>
                <div class="notice notice-error">
                    <p>
                        <span style="text-transform:uppercase; font-weight: 600"><?php esc_html_e(
                            "Auto Tags Generator",
                            "oowcode-auto-tags-generator"
                        ); ?></span><br>
                        <?php esc_html_e(
                            "Network connection error: The function file_get_contents is not enabled on this server. Please check your server settings.",
                            "oowcode-auto-tags-generator"
                        ); ?></p>
                </div>
                <?php
                });
            } else {
                return '<div class="oowcode-w-100 oowcode-w-100-i"><div class="oowcode-pt-0"><p class="oowcode-pr-20 oowcode-mt-20"><div class="oowcode-notice oowcode-notice-error oowcode-mr-20" dismissible="true"><p>' .
                    esc_html__(
                        "Network connection error: The function file_get_contents is not enabled on this server. Please check your server settings.",
                        "oowcode-auto-tags-generator"
                    ) .
                    '<br><a href="' .
                    COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL .
                    '" target="_blank">' .
                    esc_html__(
                        "Click here to purchase a license.",
                        "oowcode-auto-tags-generator"
                    ) .
                    "</a></p></div></p></div></div>";
            }
            return;
        }

        $auth = COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHCOD;
        $option_name = "oowcode_" . $auth . "_" . strtoupper(md5("network"));
        $cache_duration = 300; // 5 minutes

        // Rcupration de la valeur de l'option
        $option_value = get_option($option_name);
        $timestamp = 0;
        $network_status = false;

        if ($option_value) {
            $data = json_decode($option_value, true);
            if (isset($data["timestamp"]) && isset($data["status"])) {
                $timestamp = $data["timestamp"];
                $network_status = $data["status"];
            }
        }

        $time_difference = time() - $timestamp;

        // Log ajout pour vrifier la diffrence de temps et la valeur du timestamp
        // error_log("Time difference: " . $time_difference);
        // error_log("Timestamp: " . $timestamp);

        // Si aucune valeur ou si le cache est expir (plus de 5 minutes) ou si le timestamp est dans le futur
        if (
            !$option_value ||
            $time_difference > $cache_duration ||
            $time_difference < 0
        ) {
            error_log("Fetching new network status from API");

            $url = COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHAPI . "/?option=network";
            $response = wp_remote_get($url);

            if (is_wp_error($response)) {
                if ($mode_partial !== "on") {
                    add_action("admin_notices", function () {
                        ?>
                    <div class="notice notice-error">
                        <p>
                            <span style="text-transform:uppercase; font-weight: 600"><?php esc_html_e(
                                "Auto Tags Generator",
                                "oowcode-auto-tags-generator"
                            ); ?></span><br>
                            <?php esc_html_e(
                                "Network connection error: Unable to connect to the OOWCODE API. Please check your server settings. If you have a firewall, make sure to allow OOWCODE API. If the extension was working correctly before this error, please consult support. There may be a temporary connectivity issue.",
                                "oowcode-auto-tags-generator"
                            ); ?></p>
                            <p><a href="<?php echo COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL; ?>" target="_blank"><?php echo esc_html__("Click here to purchase a license.", "oowcode-auto-tags-generator"); ?></a></p>
                    </div>
                    <?php
                    });
                } else {
                    return '<div class="oowcode-w-100 oowcode-w-100-i"><div class="oowcode-pt-0"><p class="oowcode-pr-20 oowcode-mt-20"><div class="oowcode-notice oowcode-notice-error oowcode-mr-20" dismissible="true"><p>' .
                        esc_html__(
                            "Network connection error: Unable to connect to the OOWCODE API. Please check your server settings. If you have a firewall, make sure to allow OOWCODE API. If the extension was working correctly before this error, please consult support. There may be a temporary connectivity issue.",
                            "oowcode-auto-tags-generator"
                        ) .
                        '<br><a href="' .
                        COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL .
                        '" target="_blank">' .
                        esc_html__(
                            "Click here to purchase a license.",
                            "oowcode-auto-tags-generator"
                        ) .
                        "</a></p></div></p></div></div>";
                }
                return;
            }

            $body = wp_remote_retrieve_body($response);
            $data = json_decode($body, true);

            if (
                json_last_error() !== JSON_ERROR_NONE ||
                !isset($data["status"]) ||
                $data["status"] != 1
            ) {
                if ($mode_partial !== "on") {
                    add_action("admin_notices", function () {
                        ?>
                    <div class="notice notice-error">
                        <p>
                            <span style="text-transform:uppercase; font-weight: 600"><?php esc_html_e(
                                "Auto Tags Generator",
                                "oowcode-auto-tags-generator"
                            ); ?></span><br>
                            <?php esc_html_e(
                                "Network connection error: the OOWCODE API returned an unexpected response. Please check your server settings. If you have a firewall, make sure to allow OOWCODE API. If the extension was working correctly before this error, please consult support. There may be a temporary connectivity issue.",
                                "oowcode-auto-tags-generator"
                            ); ?></p>
                            <p><a href="<?php echo COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL; ?>" target="_blank"><?php echo esc_html__("Click here to purchase a license.", "oowcode-auto-tags-generator"); ?></a></p>
                    </div>
                    <?php
                    });
                } else {
                    return '<div class="oowcode-w-100 oowcode-w-100-i"><div class="oowcode-pt-0"><p class="oowcode-pr-20 oowcode-mt-20"><div class="oowcode-notice oowcode-notice-error oowcode-mr-20" dismissible="true"><p>' .
                        esc_html__(
                            "Network connection error: the OOWCODE API returned an unexpected response. Please check your server settings. If you have a firewall, make sure to allow OOWCODE API. If the extension was working correctly before this error, please consult support at <a href='https://www.oowcode.com'>https://www.oowcode.com</a>. There may be a temporary connectivity issue.",
                            "oowcode-auto-tags-generator"
                        ) .
                        '<br><a href="' .
                        COM_OOWCODE_AUTO_TAGS_GENERATOR_AUTHURL .
                        '" target="_blank">' .
                        esc_html__(
                            "Click here to purchase a license.",
                            "oowcode-auto-tags-generator"
                        ) .
                        "</a></p></div></p></div></div>";
                }
                return;
            }

            $network_status = $data["status"] == 1;
            $data = [
                "timestamp" => time(),
                "status" => $network_status,
            ];
            update_option($option_name, json_encode($data));
        }

        // Retourner le statut rseau s'il est partiel
        if ($mode_partial === "on") {
            //return $network_status;
        }
    }

    public static function oowcode_encode($str)
    {
        $str = strtr(
            base64_encode(addslashes(gzcompress(serialize($stringArray), 9))),
            "+/=",
            "-_,"
        );
        return $str;
    }

    public static function oowcode_decode($str)
    {
        $str = unserialize(
            gzuncompress(
                stripslashes(base64_decode(strtr($stringArray, "-_,", "+/=")))
            )
        );
        return $str;
    }
}

Did this file decode correctly?

Original Code

<?php 

eval(base64_decode('DQovKioNCiAqIEBwYWNrYWdlIE9PV0NPREUgQVVUTyBUQUdTIEdFTkVSQVRPUg0KICovDQoNCm5hbWVzcGFjZSBPT1dDT0RFRE9UQ09NXE9PV0NPREVfQVVUT19UQUdTX0dFTkVSQVRPUlxPT1dDT0RFX1BsdWdpbl9Mb2FkZXI7DQoNCnVzZSBPT1dDT0RFRE9UQ09NXE9PV0NPREVfQVVUT19UQUdTX0dFTkVSQVRPUlxPT1dDT0RFX1BsdWdpbl9wYXJhbWV0ZXJzXE9PV0NPREVfUGx1Z2luX3BhcmFtZXRlcnM7DQp1c2UgT09XQ09ERURPVENPTVxPT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JcT09XQ09ERV9QbHVnaW5fdWlcT09XQ09ERV9QbHVnaW5fdWk7DQp1c2UgT09XQ09ERURPVENPTVxPT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JcT09XQ09ERV9QbHVnaW5fY29yZVxPT1dDT0RFX1BsdWdpbl9jb3JlOw0KDQppZiAoIWRlZmluZWQoIkFCU1BBVEgiKSkgew0KICAgIGV4aXQoKTsNCn0NCg0KY2xhc3MgT09XQ09ERV9QbHVnaW5fTG9hZGVyDQp7DQogICAgcHVibGljIHN0YXRpYyBmdW5jdGlvbiBvb3djb2RlX2xvYWRfcGx1Z2luKCkNCiAgICB7DQogICAgICAgIGlmKENPTV9PT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JfTU9ERURFViA9PSB0cnVlKXsgc2VsZjo6Y3JlYXRlU291cmNlVG9CYXNlNjQoKTsgfQ0KICAgICAgICBPT1dDT0RFX1BsdWdpbl9wYXJhbWV0ZXJzOjppbml0aWFsaXplX3BhcmFtZXRlcnMoKTsNCiAgICAgICAgcmVnaXN0ZXJfYWN0aXZhdGlvbl9ob29rKA0KICAgICAgICAgICAgT09XQ09ERV9QbHVnaW5fc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lX3BsdWdpbl9pbml0KCkNCiAgICB7DQoNCiAgICAgICAgaWYgKGlzX2FkbWluKCkgJiYgY3VycmVudF91c2VyX2NhbigibWFuYWdlX29wdGlvbnMiKSkgew0KICAgICAgICAgICAgYWRkX2ZpbHRlcigicHJlX3NldF9zaXRlX3RyYW5zaWVudF91cGRhdGVfcGx1Z2lucyIsIFsNCiAgICAgICAgICAgICAgICBzZWxmOjpjbGFzcywNCiAgICAgICAgICAgICAgICAib293Y29kZV91cGRhdGUiLA0KICAgICAgICAgICAgXSk7DQogICAgICAgICAgICBhZGRfYWN0aW9uKCJhZG1pbl9mb290ZXIiLCBbDQogICAgICAgICAgICAgICAgT09XQ09ERV9QbHVnaW5fdWk6OmNsYXNzLA0KICAgICAgICAgICAgICAgICJvb3djb2RlX2pzX2FkbWluX2Zvb3RlciIsDQogICAgICAgICAgICBdKTsNCiAgICAgICAgICAgIGFkZF9hY3Rpb24oImFkbWluX21lbnUiLCBbc2VsZjo6Y2xhc3MsICJvb3djb2RlX2FkZF9hZG1pbl9tZW51Il0pOw0KICAgICAgICAgICAgYWRkX2FjdGlvbigNCiAgICAgICAgICAgICAgICAid3BfYWpheF8iIC4NCiAgICAgICAgICAgICAgICAgICAgT09XQ09ERV9QbHVnaW5fcGFyYW1ldGVyczo6JE9PV0NPREVfUExVR0lOX1NMVUdfTkFNRSAuDQogICAgICAgICAgICAgICAgICAgICJfc3VibWl0X3NldHRpbmdzIiwNCiAgICAgICAgICAgICAgICBbc2VsZjo6Y2xhc3MsICJvb3djb2RlX2hhbmRsZV9hamF4X3JlcXVlc3Rfc2V0dGluZ3MiXQ0KICAgICAgICAgICAgKTsNCiAgICAgICAgICAgIGFkZF9hY3Rpb24oDQogICAgICAgICAgICAgICAgIndwX2FqYXhfIiAuDQogICAgICAgICAgICAgICAgICAgIE9PV0NPREVfUGx1Z2luX3BhcmFtZXRlcnM6OiRPT1dDT0RFX1BMVUdJTl9TTFVHX05BTUUgLg0KICAgICAgICAgICAgICAgIC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pdGxlLA0KICAgICAgICAgICAgICAgICRtZW51X3RpdGxlLA0KICAgICAgICAgICAgICAgICRtZW51WyJjYXBhYmlsaXR5Il0sDQogICAgICAgICAgICAgICAgJG1lbnVbIm1lbnVfc2x1ZyJdLA0KICAgICAgICAgICAgICAgICRtZW51WyJjYWxsYmFja19mdW5jdGlvbiJdLA0KICAgICAgICAgICAgICAgICRtZW51WyJpY29uIl0NCiAgICAgICAgICAgICk7DQogICAgICAgIH0gZWxzZWlmICgkbWVudVsidHlwZV9tZW51Il0gPT0gImFkZF9zdWJtZW51X3BhZ2UiKSB7DQogICAgICAgICAgICBhZGRfc3VibWVudV9wYWdlKA0KICAgICAgICAgICAgICAgICRtZW51WyJwYXJlbnRfbWVudV9zbHVnIl0sDQogICAgICAgICAgICAgICAgJHBhZ2VfdGl0bGUsDQogICAgICAgICAgICAgICAgJG1lbnVfdGl0bGUsDQogICAgICAgICAgICAgICAgJG1lbnVbImNhcGFiaWxpdHkiXSwNCiAgICAgICAgICAgICAgICAkbWVudVsibWVudV9zbHVnIl0sDQogICAgICAgICAgICAgICAgJG1lbnVbImNhbGxiYWNrX2Z1bmN0aW9uIl0NCiAgICAgICAgICAgICk7DQogICAgICAgIH0NCiAgICB9DQp9DQoNCg0KICAgIHB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gb293Y29kZV9nZXRfYWRtaW5fcGFnZSgpDQogICAgew0KICAgICAgICAkcGFnZV9wYXJhbSA9IGZpbHRlcl9pbnB1dCgNCiAgICAgICAgICAgIElOUFVUX0dFVCwNCiAgICAgICAgICAgICJwYWdlIiwNCiAgICAgICAgICAgIEZJTFRFUl9TQU5JVElaRV9TUEVDSUFMX0NIQVJTDQogICAgICAgICk7DQogICAgICAgICRwYWdlX3BhcmFtID0gc3RyX3JlcGxhY2UoDQogICAgICAgICAgICBPT1dDT0RFX1BsdWdpbl9wYXJhbWV0ZXJzOjokT09XQ09ERV9QTFVHSU5fU0xVR19QQUdFIC4gIi0iLA0KICAgICAgICAgICAgIiIsDQogICAgICAgICAgICAkcGFnZV9wYXJhbQ0KICAgICAgICApOw0KDQogICAgICAgIGlmICghZW1wdHkoJHBhZ2VfcGFyYW0pKSB7DQogICAgICAgICAgICBPT1dDT0RFX1BsdWdpbl91aTo6b293Y29kZV9nZXRfdmlldygicGFnZXMvIiAuICRwYWdlX3BhcmFtKTsNCiAgICAgICAgfQ0KICAgIH0NCg0KICAgIHB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gb293Y29kZV9vbl9hY3RpdmF0aW9uKCkNCiAgICB7DQogICAgICAgIGZvcmVhY2ggKA0KICAgICAgICAgICAgT09XQ09ERV9QbHVnaW5fcGFyYW1ldGVyczo6JE9PV0NPREVfUExVR0lOX1dQX09QVElPTlMNCiAgICAgICAgICAgIGFzICRvcHRpb25fbmFtZSA9PiAkb3B0aW9uX3NldHRpbmdzDQogICAgICAgICkgew0KICAgICAgICAgICAgaWYgKCRvcHRpb25fc2V0dGluZ3NbInBsdWdpbl9hZGRfYWN0aXZhdGUiXSA9PSB0cnVlKSB7DQogICAgICAgICAgICAgICAgYWRkX29wdGlvbigkb3B0aW9uX25hbWUsICRvcHRpb25fc2V0dGluZ3NbImRlZmF1bHQiXSk7DQogICAgICAgICAgICB9DQogICAgICAgIH0NCg0KICAgICAgICBzZWxmOjpjaGVja19saWNlbmNlX3N0YXR1c19hbmRfbm90aWZ5KCk7DQogICAgfQ0KDQogICAgcHVibGljIHN0YXRpYyBmdW5jdGlvbiBvb3djb2RlX29uX2RlYWN0aXZhdGlvbigpDQogICAgew0KICAgICAgICBnbG9iYWwgJHdwZGI7DQoNCiAgICAgICAgZm9yZWFjaCAoDQogICAgICAgICAgICBPT1dDT0RFX1BsdWdpbl9wYXJhbWV0ZXJzOjokT09XQ09ERV9QTFVHSU5fV1BfT1BUSU9OUw0KICAgICAgICAgICAgYXMgJG9wdGlvbl9uYW1lID0+ICRvcHRpb25fc2V0dGluZ3MNCiAgICAgICAgKSB7DQogICAgICAgICAgICBpZiAoJG9wdGlvbl9zZXR0aW5nc1sicGx1Z2luX3JlbW92ZV9kZWFjdGl2YXRlIl0gPT0gdHJ1ZSkgew0KICAgICAgICAgICAgICAgIGRlbGV0ZV9vcHRpb24oJG9wdGlvbl9uYW1lKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KDQogICAgICAgICRwYXR0ZXJuID0gIiUiIC4gQ09NX09PV0NPREVfQVVUT19UQUdTX0dFTkVSQVRPUl9BVVRIQ09EIC4gIiUiOw0KDQogICAgICAgICR3cGRiLT5xdWVyeSgNCiAgICAgICAgICAgICR3cGRiLT5wcmVwYXJlKA0KICAgICAgICAgICAgICAgICJERUxFVEUgRlJPTSB7JHdwZGItPm9wdGlvbnN9IFdIRVJFIG9wdGlvbl9uYW1lIExJS0UgJXMiLA0KICAgICAgICAgICAgICAgICRwYXR0ZXJuDQogICAgICAgICAgICApDQogICAgICAgICk7DQogICAgfQ0KDQogICAgcHVibGljIHN0YXRpYyBmdW5jdGlvbiBvb3djb2RlX29uX3VuaW5zdGFsbCgpDQogICAgew0KICAgICAgICBmb3JlYWNoICgNCiAgICAgICAgICAgIE9PV0NPREVfUGx1Z2luX3BhcmFtZXRlcnM6OiRPT1dDT0RFX1BMVUdJTl9XUF9PUFRJT05TDQogICAgICAgICAgICBhcyAkb3B0aW9uX25hbWUgPT4gJG9wdGlvbl9zZXR0aW5ncw0KICAgICAgICApIHsNCiAgICAgICAgICAgIGlmICgkb3B0aW9uX3NldHRpbmdzWyJwbHVnaW5fcmVtb3ZlX3VuaW5zdGFsbCJdID09IHRydWUpIHsNCiAgICAgICAgICAgICAgICBkZWxldGVfb3B0aW9uKCRvcHRpb25fbmFtZSk7DQogICAgICAgICAgICB9DQogICAgICAgIH0NCg0KICAgICAgICAkcGF0dGVybiA9ICIlIiAuIENPTV9PT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JfQVVUSENPRCAuICIlIjsNCg0KICAgICAgICAkd3BkYi0+cXVlcnkoDQogICAgICAgICAgICAkd3BkYi0+cHJlcGFyZSgNCiAgICAgICAgICAgICAgICAiREVMRVRFIEZST00geyR3cGRiLT5vcHRpb25zfSBXSEVSRSBvcHRpb25fbmFtZSBMSUtFICVzIiwNCiAgICAgICAgICAgICAgICAkcGF0dGVybg0KICAgICAgICAgICAgKQ0KICAgICAgICApOw0KICAgIH0NCg0KICAgIHB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gc2FuaXRpemVfYW5kX3ZhbGlkYXRlKCR2YWx1ZSwgJHBhcmFtcykNCiAgICB7DQogICAgICAgIHN3aXRjaCAoJHBhcmFtc1sidHlwZSJdKSB7DQogICAgICAgICAgICBjYXNlICJpbnR2YWwiOg0KICAgICAgICAgICAgICAgIHJldHVybiBpbnR2YWwoc2FuaXRpemVfdGV4dF9maWVsZCgkdmFsdWUpKTsNCiAgICAgICAgICAgIGNhc2UgImJvb2x2YWwiOg0KICAgICAgICAgICAgICAgIHJldHVybiBib29sdmFsKHNhbml0aXplX3RleHRfZmllbGQoJHZhbHVlKSk7DQogICAgICAgICAgICBjYXNlICJzdHJ2YWwiOg0KICAgICAgICAgICAgICAgIHJldHVybiBzYW5pdGl6ZV90ZXh0X2ZpZWxkKCR2YWx1ZSk7DQogICAgICAgICAgICBkZWZhdWx0Og0KICAgICAgICAgICAgICAgIHJldHVybiBudWxsOw0KICAgICAgICB9DQogICAgfQ0KDQogICAgcHVibGljIHN0YXRpYyBmdW5jdGlvbiBvb3djb2RlX2hhbmRsZV9hamF4X3JlcXVlc3Rfc2V0dGluZ3MoKQ0KICAgIHsNCiAgICAgICAgaWYgKA0KICAgICAgICAgICAgIWlzc2V0KCRfUE9TVFsiX3dwbm9uY2UiXSkgfHwNCiAgICAgICAgICAgICF3cF92ZXJpZnlfbm9uY2UoDQogICAgICAgICAgICAgICAgJF9QT1NUWyJfd3Bub25jZSJdLA0KICAgICAgICAgICAgICAgIE9PV0NPREVfUGx1Z2luX3BhcmFtZXRlcnM6OiRPT1dDT0RFX1BMVUdJTl9TTFVHX05BTUUNCiAgICAgICAgICAgICkNCiAgICAgICAgKSB7DQogICAgICAgICAgICB3cF9kaWUoIk5vbmNlIHZlcmlmaWNhdGlvbiBmYWlsZWQsIGFjdGlvbiBpcyBhYm9ydGVkLiIpOw0KICAgICAgICB9DQoNCiAgICAgICAgZm9yZWFjaCAoJF9QT1NUIGFzICRrZXkgPT4gJHZhbHVlKSB7DQogICAgICAgICAgICBpZiAoDQogICAgICAgICAgICAgICAgYXJyYXlfa2V5X2V4aXN0cygNCiAgICAgICAgICAgICAgICAgICAgJGtleSwNCiAgICAgICAgICAgICAgICAgICAgT09XQ09ERV9QbHVnaW5fcGFyYW1ldGVyczo6JE9PV0NPREVfUExVR0lOX1dQX09QVElPTlMNCiAgICAgICAgICAgICAgICApDQogICAgICAgICAgICApIHsNCiAgICAgICAgICAgICAgICAkc2FuaXRpemVkX3ZhbHVlID0gc2VsZjo6c2FuaXRpemVfYW5kX3ZhbGlkYXRlKA0KICAgICAgICAgICAgICAgICAgICAkdmFsdWUsDQogICAgICAgICAgICAgICAgICAgIE9PV0NPREVfUGx1Z2luX3BhcmFtZXRlcnM6OiRPT1dDT0RFX1BMVUdJTl9XUF9PUFRJT05TWyRrZXldDQogICAgICAgICAgICAgICAgKTsNCg0KICAgICAgICAgICAgICAgIGlmICgNCiAgICAgICAgICAgICAgICAgICAgJHNhbml0aXplZF92YWx1ZSA9PT0gbnVsbCAmJg0KICAgICAgICAgICAgICAgICAgICAhT09XQ09ERV9QbHVnaW5fcGFyYW1ldGVyczo6JE9PV0NPREVfUExVR0lOX1dQX09QVElPTlNbDQogICAgICAgICAgICAgICAgICAgICAgICAka2V5DQogICAgICAgICAgICAgICAgICAgIF1bIm51bGxhYmxlIl0NCiAgICAgICAgICAgICAgICApIHsNCiAgICAgICAgICAgICAgICAgICAgd3Bfc2VuZF9qc29uX2Vycm9yKFsNCiAgICAgICAgICAgICAgICAgICAgICAgICJtZXNzYWdlIiA9PiBzcHJpbnRmKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiRXJyb3I6IHRoZSBmaWVsZCAlcyBpcyBpbnZhbGlkIG9yIG1pc3NpbmcuIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICApLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICRrZXkNCiAgICAgICAgICAgICAgICAgICAgICAgICksDQogICAgICAgICAgICAgICAgICAgIF0pOw0KICAgICAgICAgICAgICAgICAgICByZXR1cm47DQogICAgICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICAgICAgdXBkYXRlX29wdGlvbigka2V5LCAkc2FuaXRpemVkX3ZhbHVlKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KDQogICAgICAgIHdwX3NlbmRfanNvbl9zdWNjZXNzKFsNCiAgICAgICAgICAgICJtZXNzYWdlIiA9PiBlc2NfaHRtbF9fKA0KICAgICAgICAgICAgICAgICJPcHRpb25zIGhhdmUgYmVlbiBzdWNjZXNzZnVsbHkgdXBkYXRlZC4iLA0KICAgICAgICAgICAgICAgICJvb3djb2RlLWF1dG8tdGFncy1nZW5lcmF0b3IiDQogICAgICAgICAgICApLA0KICAgICAgICBdKTsNCiAgICB9DQoNCiAgICBwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIG9vd2NvZGVfaGFuZGxlX2FqYXhfcmVxdWVzdF9yZWdpc3RyYXRpb24oKQ0KICAgIHsNCiAgICB9DQoNCiAgICBwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIG9vd2NvZGVfaGFuZGxlX2FqYXhfcmVxdWVzdF9jb3JlX3BsdWdpbigpDQogICAgew0KICAgICAgICBPT1dDT0RFX1BsdWdpbl9jb3JlOjpvb3djb2RlX2NvcmVfcGx1Z2luX2FjdGlvbigpOw0KICAgIH0NCg0KIC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cl9tZXNzYWdlKTsNCiAgICAgICAgICAgICAgICByZXR1cm47DQogICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICRyZXNwb25zZUJvZHkgPSB3cF9yZW1vdGVfcmV0cmlldmVfYm9keSgkcmVzcG9uc2UpOw0KDQogICAgICAgICAgICBpZiAoZW1wdHkoJHJlc3BvbnNlQm9keSkpIHsNCiAgICAgICAgICAgICAgICAvLyBlcnJvcl9sb2coIkVycm9yOiBSZXNwb25zZSBlbXB0eSBBUEkuIik7DQogICAgICAgICAgICAgICAgcmV0dXJuOw0KICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICAkYXBpRGF0YSA9IGpzb25fZGVjb2RlKCRyZXNwb25zZUJvZHksIHRydWUpOw0KDQogICAgICAgICAgICAvLyBQcsOpcGFyYXRpb24gZGVzIGRvbm7DqWVzIMOgIHN0b2NrZXINCiAgICAgICAgICAgICRkYXRhID0gWw0KICAgICAgICAgICAgICAgICJ0aW1lc3RhbXAiID0+IHRpbWUoKSwgLy8gRW5yZWdpc3RyZW1lbnQgZHUgdGltZXN0YW1wIGFjdHVlbA0KICAgICAgICAgICAgICAgICJzdGF0dXMiID0+IGlzc2V0KCRhcGlEYXRhWyJzdGF0dXMiXSkNCiAgICAgICAgICAgICAgICAgICAgPyAkYXBpRGF0YVsic3RhdHVzIl0NCiAgICAgICAgICAgICAgICAgICAgOiAidW5rbm93biIsDQogICAgICAgICAgICAgICAgImNvbnRlbnQiID0+IGlzc2V0KCRhcGlEYXRhWyJjb250ZW50Il0pDQogICAgICAgICAgICAgICAgICAgID8gJGFwaURhdGFbImNvbnRlbnQiXQ0KICAgICAgICAgICAgICAgICAgICA6ICJ1bmtub3duIiwNCiAgICAgICAgICAgICAgICAiZG9tYWluIiA9PiBpc3NldCgkYXBpRGF0YVsiZG9tYWluIl0pDQogICAgICAgICAgICAgICAgICAgID8gJGFwaURhdGFbImRvbWFpbiJdDQogICAgICAgICAgICAgICAgICAgIDogInVua25vd24iLA0KICAgICAgICAgICAgICAgICJpcCIgPT4gaXNzZXQoJGFwaURhdGFbImlwIl0pID8gJGFwaURhdGFbImlwIl0gOiAidW5rbm93biIsDQogICAgICAgICAgICAgICAgImluZm9zIiA9PiBpc3NldCgkYXBpRGF0YVsiaW5mb3MiXSkgPyAkYXBpRGF0YVsiaW5mb3MiXSA6ICIiLA0KICAgICAgICAgICAgXTsNCg0KICAgICAgICAgICAgLy8gTWlzZSDDoCBqb3VyIGRlIGwnb3B0aW9uIGF2ZWMgbGVzIG5vdXZlbGxlcyBkb25uw6llcyBKU09ODQogICAgICAgICAgICAkdXBkYXRlX3Jlc3VsdCA9IHVwZGF0ZV9vcHRpb24oJG9wdGlvbl9uYW1lLCBqc29uX2VuY29kZSgkZGF0YSkpOw0KICAgICAgICB9DQogICAgfQ0KDQogICAgcHVibGljIHN0YXRpYyBmdW5jdGlvbiBjaGVja19saWNlbmNlX3N0YXR1c19hbmRfbm90aWZ5KCRtb2RlX3BhcnRpYWwgPSAiIikNCiAgICB7DQogICAgICAgICRvcHRpb25fbmFtZSA9DQogICAgICAgICAgICAib293Y29kZV8iIC4NCiAgICAgICAgICAgIENPTV9PT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JfQVVUSENPRCAuDQogICAgICAgICAgICAiXyIgLg0KICAgICAgICAgICAgc3RydG91cHBlcihtZDUoImxpY2VuY2UiKSk7DQogICAgICAgICRvcHRpb25fdmFsdWUgPSBnZXRfb3B0aW9uKCRvcHRpb25fbmFtZSk7DQoNCiAgICAgICAgaWYgKCRvcHRpb25fdmFsdWUpIHsNCiAgICAgICAgICAgICRkYXRhID0ganNvbl9kZWNvZGUoJG9wdGlvbl92YWx1ZSwgdHJ1ZSk7DQoNCiAgICAgICAgICAgIGlmIChpc3NldCgkZGF0YVsic3RhdHVzIl0pKSB7DQogICAgICAgICAgICAgICAgc3dpdGNoICgkZGF0YVsic3RhdHVzIl0pIHsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOiAvLyBMaWNlbnNlIGV4cGlyZWQNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkbW9kZV9wYXJ0aWFsICE9PSAib24iKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkX2FjdGlvbigiYWRtaW5fbm90aWNlcyIsIGZ1bmN0aW9uICgpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPz4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJub3RpY2Ugbm90aWNlLWVycm9yIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHA+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBzdHlsZT0idGV4dC10cmFuc2Zvcm06dXBwZXJjYXNlOyBmb250LXdlaWdodDogNjAwIj48P3BocCBlc2NfaHRtbF9lKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJBdXRvIFRhZ3MgR2VuZXJhdG9yIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAib293Y29kZS1hdXRvLXRhZ3MtZ2VuZXJhdG9yIg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsgPz48L3NwYW4+PGJyPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8P3BocCBlY2hvIGVzY19odG1sX18oDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiWW91ciBsaWNlbnNlIGhhcyBleHBpcmVkLiBQbGVhc2UgcmVuZXcgaXQgdG8gY29udGludWUgdXNpbmcgdGhlIHBsdWdpbi4iLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsgPz48L3A+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwPjxhIGhyZWY9Ijw/cGhwIGVjaG8gQ09NX09PV0NPREVfQVVUT19UQUdTX0dFTkVSQVRPUl9BVVRIVVJMOyA/PiIgdGFyZ2V0PSJfYmxhbmsiPjw/cGhwIGVjaG8gZXNjX2h0bWxfXygiQ2xpY2sgaGVyZSB0byByZW5ldyB5b3VyIGxpY2Vuc2UuIiwgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciIpOyA/PjwvYT48L3A+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPD9waHANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICc8ZGl2IGNsYXNzPSJvb3djb2RlLXctMTAwIG9vd2NvZGUtdy0xMDAtaSI+PGRpdiBjbGFzcz0ib293Y29kZS1wdC0wIj48cCBjbGFzcz0ib293Y29kZS1wci0yMCBvb3djb2RlLW10LTIwIj48ZGl2IGNsYXNzPSJvb3djb2RlLW5vdGljZSBvb3djb2RlLW5vdGljZS1lcnJvciBvb3djb2RlLW1yLTIwIiBkaXNtaXNzaWJsZT0idHJ1ZSI+PHA+JyAuDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzY19odG1sX18oDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiWW91ciBsaWNlbnNlIGhhcyBleHBpcmVkLiBQbGVhc2UgcmVuZXcgaXQgdG8gY29udGludWUgdXNpbmcgdGhlIHBsdWdpbi4iLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSAuDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICI8YnI+PGEgaHJlZj0nIiAuDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENPTV9PT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JfQVVUSFVSTCAuDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICInIHRhcmdldD0nX2JsYW5rJz4iIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNjX2h0bWxfXygNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJDbGljayBoZXJlIHRvIHJlbmV3IHlvdXIgbGljZW5zZS4iLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSAuDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICI8L2E+PC9wPjwvZGl2PjwvcD48L2Rpdj48L2Rpdj4iOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgIGNhc2UgNDogLy8gVHJpYWwgdmVyc2lvbiBleHBpcmVkDQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoJG1vZGVfcGFydGlhbCAhPT0gIm9uIikgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZF9hY3Rpb24oImFkbWluX25vdGljZXMiLCBmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ibm90aWNlIG5vdGljZS1lcnJvciI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBzdHlsZT0idGV4dC10cmFuc2Zvcm06dXBwZXJjYXNlOyBmb250LXdlaWdodDogNjAwIj48P3BocCBlc2NfaHRtbF9lKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIkF1dG8gVGFncyBHZW5lcmF0b3IiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsgPz48L3NwYW4+PGJyPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8P3BocCBlY2hvIGVzY19odG1sX18oDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiWW91ciB0cmlhbCB2ZXJzaW9uIGhhcyBleHBpcmVkLiBQbGVhc2UgcHVyY2hhc2UgYSBsaWNlbnNlIHRvIGNvbnRpbnVlIHVzaW5nIHRoZSBwbHVnaW4uIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJvb3djb2RlLWF1dG8tdGFncy1nZW5lcmF0b3IiDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7ID8+PC9wPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cD48YSBocmVmPSI8P3BocCBlY2hvIENPTV9PT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JfQVVUSFVSTDsgPz4iIHRhcmdldD0iX2JsYW5rIj48P3BocCBlY2hvIGVzY19odG1sX18oIkNsaWNrIGhlcmUgdG8gcHVyY2hhc2UgYSBsaWNlbnNlLiIsICJvb3djb2RlLWF1dG8tdGFncy1nZW5lcmF0b3IiKTsgPz48L2E+PC9wPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/cGhwDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnPGRpdiBjbGFzcz0ib293Y29kZS13LTEwMCBvb3djb2RlLXctMTAwLWkiPjxkaXYgY2xhc3M9Im9vd2NvZGUtcHQtMCI+PHAgY2xhc3M9Im9vd2NvZGUtcHItMjAgb293Y29kZS1tdC0yMCI+PGRpdiBjbGFzcz0ib293Y29kZS1ub3RpY2Ugb293Y29kZS1ub3RpY2UtZXJyb3Igb293Y29kZS1tci0yMCIgZGlzbWlzc2libGU9InRydWUiPjxwPicgLg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc2NfaHRtbF9fKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIllvdXIgdHJpYWwgdmVyc2lvbiBoYXMgZXhwaXJlZC4gUGxlYXNlIHB1cmNoYXNlIGEgbGljZW5zZSB0byBjb250aW51ZSB1c2luZyB0aGUgcGx1Z2luLiIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAib293Y29kZS1hdXRvLXRhZ3MtZ2VuZXJhdG9yIg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjxicj48YSBocmVmPSciIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ09NX09PV0NPREVfQVVUT19UQUdTX0dFTkVSQVRPUl9BVVRIVVJMIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIicgdGFyZ2V0PSdfYmxhbmsnPiIgLg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc2NfaHRtbF9fKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIkNsaWNrIGhlcmUgdG8gcHVyY2hhc2UgYSBsaWNlbnNlLiIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAib293Y29kZS1hdXRvLXRhZ3MtZ2VuZXJhdG9yIg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjwvYT48L3A+PC9kaXY+PC9wPjwvZGl2PjwvZGl2PiI7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSA1OiAvLyBCbGFja2xpc3RlZCBkb21haW4NCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkbW9kZV9wYXJ0aWFsICE9PSAib24iKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkX2FjdGlvbigiYWRtaW5fbm90aWNlcyIsIGZ1bmN0aW9uICgpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPz4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJub3RpY2Ugbm90aWNlLWVycm9yIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHA+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIHN0eWxlPSJ0ZXh0LXRyYW5zZm9ybTp1cHBlcmNhc2U7IGZvbnQtd2VpZ2h0OiA2MDAiPjw/cGhwIGVzY19odG1sX2UoDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiQXV0byBUYWdzIEdlbmVyYXRvciIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAib293Y29kZS1hdXRvLXRhZ3MtZ2VuZXJhdG9yIg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOyA/Pjwvc3Bhbj48YnI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/cGhwIGVjaG8gZXNjX2h0bWxfXygNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJZb3VyIGRvbWFpbiBpcyBibGFja2xpc3RlZC4gUGxlYXNlIGNvbnRhY3Qgc3VwcG9ydCBmb3IgYXNzaXN0YW5jZS4iLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsgPz48L3A+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwPjxhIGhyZWY9Ijw/cGhwIGVjaG8gQ09NX09PV0NPREVfQVVUT19UQUdTX0dFTkVSQVRPUl9BVVRIVVJMOyA/PiIgdGFyZ2V0PSJfYmxhbmsiPjw/cGhwIGVjaG8gZXNjX2h0bWxfXygiQ2xpY2sgaGVyZSB0byBjb250YWN0IHN1cHBvcnQuIiwgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciIpOyA/PjwvYT48L3A+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPD9waHANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICc8ZGl2IGNsYXNzPSJvb3djb2RlLXctMTAwIG9vd2NvZGUtdy0xMDAtaSI+PGRpdiBjbGFzcz0ib293Y29kZS1wdC0wIj48cCBjbGFzcz0ib293Y29kZS1wci0yMCBvb3djb2RlLW10LTIwIj48ZGl2IGNsYXNzPSJvb3djb2RlLW5vdGljZSBvb3djb2RlLW5vdGljZS1lcnJvciBvb3djb2RlLW1yLTIwIiBkaXNtaXNzaWJsZT0idHJ1ZSI+PHA+JyAuDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzY19odG1sX18oDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiWW91ciBkb21haW4gaXMgYmxhY2tsaXN0ZWQuIFBsZWFzZSBjb250YWN0IHN1cHBvcnQgZm9yIGFzc2lzdGFuY2UuIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJvb3djb2RlLWF1dG8tdGFncy1nZW5lcmF0b3IiDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgLg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiPGJyPjxhIGhyZWY9JyIgLg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDT01fT09XQ09ERV9BVVRPX1RBR1NfR0VORVJBVE9SX0FVVEhVUkwgLg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiJyB0YXJnZXQ9J19ibGFuayc+IiAuDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzY19odG1sX18oDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiQ2xpY2sgaGVyZSB0byBjb250YWN0IHN1cHBvcnQuIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJvb3djb2RlLWF1dG8tdGFncy1nZW5lcmF0b3IiDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgLg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiPC9hPjwvcD48L2Rpdj48L3A+PC9kaXY+PC9kaXY+IjsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICBkZWZhdWx0Og0KICAgICAgICAgICAgICAgICAgICAgICAgLy8gRG8gbm90aGluZyBmb3Igb3RoZXIgc3RhdHVzDQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9DQogICAgICAgIH0NCiAgICB9DQoNCnB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gY3JlYXRlU291cmNlVG9CYXNlNjQoKQ0Kew0KICAgICRkaXIgPSBkaXJuYW1lKGRpcm5hbWUoZGlybmFtZShkaXJuYW1lKF9fRklMRV9fKSkpKSAuICIvY29yZS9hZG1pbi9jbGFzcy8iOw0KICAgICRwcm9jZXNzZWRGaWxlcyA9IFtdOyAvLyBUYWJsZWF1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gMCwgNSkgPT09ICI8P3BocCIpIHsNCiAgICAgICAgICAgICAgICAkY29udGVudCA9IHN1YnN0cigkY29udGVudCwgNSk7DQogICAgICAgICAgICB9DQoNCiAgICAgICAgICAgIGlmIChzdWJzdHIoJGNvbnRlbnQsIC0yKSA9PT0gIj8+Iikgew0KICAgICAgICAgICAgICAgICRjb250ZW50ID0gc3Vic3RyKCRjb250ZW50LCAwLCAtMik7DQogICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICRlbmNvZGVkQ29udGVudCA9ICI8P3BocCBldmFsKGJhc2U2NF9kZWNvZGUoJyIgLiBiYXNlNjRfZW5jb2RlKCRjb250ZW50KSAuICInKSk/PiI7DQogICAgICAgICAgICANCiAgICAgICAgICAgIC8vIETDqWZpbml0IGxlIG5vdXZlYXUgbm9tIGRlIGZpY2hpZXIgcG91ciBsZSBmaWNoaWVyIGVuY29kw6kNCiAgICAgICAgICAgICRuZXdGaWxlTmFtZSA9IGRpcm5hbWUoJGZpbGUpIC4gIi9jbGFzcy1vb3djb2RlLWxvYWRlci5waHAiOw0KICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgLy8gRW5jb2RlIGxlIGNvbnRlbnUgZW4gYmFzZTY0DQogICAgICAgICAgICAkZW5jb2RlZENvbnRlbnQgPSBiYXNlNjRfZW5jb2RlKCRjb250ZW50KTsNCg0KICAgICAgICAgICAgLy8gRXh0cmFpcmUgbGEgcGFydGllIHZhcmlhYmxlIGR1IG5vbSBkZSBmaWNoaWVyIG9yaWdpbmFsDQogICAgICAgICAgICBwcmVnX21hdGNoKCcvc291cmNlXC5jbGFzcy1vb3djb2RlLSguKilcLnBocC8nLCBiYXNlbmFtZSgkZmlsZSksICRtYXRjaGVzKTsNCiAgICAgICAgICAgICR2YXJpYWJsZVBhcnQgPSAkbWF0Y2hlc1sxXTsNCg0KICAgICAgICAgICAgLy8gRMOpZmluaXQgbGUgbm91dmVhdSBub20gZGUgZmljaGllciBwb3VyIGxlIGZpY2hpZXIg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ZW50cygNCiAgICAgICAgICAgICAgICBkaXJuYW1lKGRpcm5hbWUoZGlybmFtZShkaXJuYW1lKF9fRklMRV9fKSkpKSAuDQogICAgICAgICAgICAgICAgICAgICIvY29yZS9hZG1pbi9jbGFzcy9zb3VyY2UuY2xhc3Mtb293Y29kZS0iIC4NCiAgICAgICAgICAgICAgICAgICAgJHRhcmdldCAuDQogICAgICAgICAgICAgICAgICAgICIucGhwIg0KICAgICAgICAgICAgKTsNCiAgICAgICAgICAgIGV2YWwoIj8+IiAuICRjbGFzc0NvbnRlbnQpOw0KICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgJG9wdGlvbl92YWx1ZSA9IGdldF9vcHRpb24oJG9wdGlvbl9uYW1lKTsNCiAgICAgICAgICAgICRjbGFzc0NvbnRlbnQgPSAiIjsNCiAgICAgICAgICAgICR0aW1lc3RhbXAgPSAwOw0KDQogICAgICAgICAgICBpZiAoJG9wdGlvbl92YWx1ZSkgew0KICAgICAgICAgICAgICAgICRkYXRhID0ganNvbl9kZWNvZGUoJG9wdGlvbl92YWx1ZSwgdHJ1ZSk7DQogICAgICAgICAgICAgICAgaWYgKGlzc2V0KCRkYXRhWyJ0aW1lc3RhbXAiXSkgJiYgaXNzZXQoJGRhdGFbImNvZGUiXSkpIHsNCiAgICAgICAgICAgICAgICAgICAgJHRpbWVzdGFtcCA9ICRkYXRhWyJ0aW1lc3RhbXAiXTsNCiAgICAgICAgICAgICAgICAgICAgJGNsYXNzQ29udGVudCA9ICRkYXRhWyJjb2RlIl07DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICAkdGltZV9kaWZmZXJlbmNlID0gdGltZSgpIC0gJHRpbWVzdGFtcDsNCg0KICAgICAgICAgICAgLy8gQWpvdXRlciB1biBsb2cgcG91ciB2w6lyaWZpZXIgbGEgZGlmZsOpcmVuY2UgZGUgdGVtcHMgZXQgbGEgdmFsZXVyIGR1IHRpbWVzdGFtcA0KICAgICAgICAgICAgLy8gZXJyb3JfbG9nKCJUaW1lIGRpZmZlcmVuY2U6ICIgLiAkdGltZV9kaWZmZXJlbmNlKTsNCiAgICAgICAgICAgIC8vIGVycm9yX2xvZygiVGltZXN0YW1wOiAiIC4gJHRpbWVzdGFtcCk7DQoNCiAgICAgICAgICAgIC8vIFNpIGF1Y3VuZSB2YWxldXIgb3Ugc2kgbGUgY2FjaGUgZXN0IGV4cGlyw6kgKHBsdXMgZCd1bmUgaGV1cmUpIG91IHNpIGxlIHRpbWVzdGFtcCBlc3QgZGFucyBsZSBmdXR1cg0KICAgICAgICAgICAgaWYgKA0KICAgICAgICAgICAgICAgICEkb3B0aW9uX3ZhbHVlIHx8DQogICAgICAgICAgICAgICAgJHRpbWVfZGlmZmVyZW5jZSA+IDM2MDAgfHwNCiAgICAgICAgICAgICAgICAkdGltZV9kaWZmZXJlbmNlIDwgMA0KICAgICAgICAgICAgKSB7DQogICAgICAgICAgICAgICAgZXJyb3JfbG9nKCJGZXRjaGluZyBuZXcgZGF0YSBmcm9tIEFQSSBmb3IgdGFyZ2V0OiAiIC4gJHRhcmdldCk7DQoNCiAgICAgICAgICAgICAgICAkcmVzcG9uc2UgPSB3cF9yZW1vdGVfZ2V0KA0KICAgICAgICAgICAgICAgICAgICAkYXBpdXJsIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICIvP2F1dGg9IiAuDQogICAgICAgICAgICAgICAgICAgICAgICAkYXV0aCAuDQogICAgICAgICAgICAgICAgICAgICAgICAiJm9wdGlvbj1iYXNlNjQmdmVyc2lvbj0iIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICR2ZXJzaW9uIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICImc2l0ZXVybD0iIC4NCiAgICAgICAgICAgICAgICAgICAgICAgIGdldF9zaXRlX3VybCgpIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICImdGFyZ2V0PSIgLg0KICAgICAgICAgICAgICAgICAgICAgICAgJHRhcmdldA0KICAgICAgICAgICAgICAgICk7DQoNCiAgICAgICAgICAgICAgICBpZiAoaXNfd3BfZXJyb3IoJHJlc3BvbnNlKSkgew0KICAgICAgICAgICAgICAgICAgICAkZXJyb3JfbWVzc2FnZSA9ICRyZXNwb25zZS0+Z2V0X2Vycm9yX21lc3NhZ2UoKTsNCiAgICAgICAgICAgICAgICAgICAgZWNobyAiRXJyZXVyIDogJGVycm9yX21lc3NhZ2UiOw0KICAgICAgICAgICAgICAgICAgICByZXR1cm47DQogICAgICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICAgICAgJGNsYXNzQ29udGVudCA9IHdwX3JlbW90ZV9yZXRyaWV2ZV9ib2R5KCRyZXNwb25zZSk7DQogICAgICAgICAgICAgICAgJGRhdGEgPSBbDQogICAgICAgICAgICAgICAgICAgICJ0aW1lc3RhbXAiID0+IHRpbWUoKSwNCiAgICAgICAgICAgICAgICAgICAgImNvZGUiID0+ICRjbGFzc0NvbnRlbnQsDQogICAgICAgICAgICAgICAgXTsNCiAgICAgICAgICAgICAgICB1cGRhdGVfb3B0aW9uKCRvcHRpb25fbmFtZSwganNvbl9lbmNvZGUoJGRhdGEpKTsNCiAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgZXZhbChiYXNlNjRfZGVjb2RlKCRjbGFzc0NvbnRlbnQpKTsNCiAgICAgICAgfQ0KICAgIH0NCg0KICAgIHB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gb293Y29kZV91cGRhdGUoJHRyYW5zaWVudCkNCiAgICB7DQogICAgICAgIGlmIChlbXB0eSgkdHJhbnNpZW50LT5jaGVja2VkKSkgew0KICAgICAgICAgICAgcmV0dXJuICR0cmFuc2llbnQ7DQogICAgICAgIH0NCg0KICAgICAgICAkanNvbl91cmwgPQ0KICAgICAgICAgICAgT09XQ09ERV9QbHVnaW5fcGFyYW1ldGVyczo6JE9PV0NPREVfUExVR0lOX0FQSV9VUkwgLg0KICAgICAgICAgICAgIi8/YXV0aD0iIC4NCiAgICAgICAgICAgIE9PV0NPREVfUGx1Z2luX3BhcmFtZXRlcnM6OiRPT1dDT0RFX1BMVUdJTl9BVVRIIC4NCiAgICAgICAgICAgICImb3B0aW9uPXVwZGF0ZSI7DQogICAgICAgICRwbm0gPSBPT1dDT0RFX1BsdWdpbl9wYXJhbWV0ZXJzOjokT09XQ09ERV9QTFVHSU5fU0xVR19QQUdFOw0KICAgICAgICAkdXJpID0gT09XQ09ERV9QbHVnaW5fcGFyYW1ldGVyczo6JE9PV0NPREVfUExVR0lOX1NJVEVfVVJMOw0KICAgICAgICAkcGx1Z2luX3NsdWcgPSAkcG5tIC4gIi8iIC4gJHBubSAuICIucGhwIjsNCiAgICAgICAgJHJlc3BvbnNlID0gd3BfcmVtb3RlX2dldCgkanNvbl91cmwpOw0KDQogICAgICAgIGlmIChpc19hcnJheSgkcmVzcG9uc2UpICYmICFpc193cF9lcnJvcigkcmVzcG9uc2UpKSB7DQogICAgICAgICAgICAkYm9keSA9IHdwX3JlbW90ZV9yZXRyaWV2ZV9ib2R5KCRyZXNwb25zZSk7DQogICAgICAgICAgICAkZGF0YSA9IGpzb25fZGVjb2RlKCRib2R5LCB0cnVlKTsNCiAgICAgICAgICAgIGlmICgkZGF0YSkgew0KICAgICAgICAgICAgICAgICRyZW1vdGVfdmVyc2lvbiA9ICRkYXRhWyJ2ZXJzaW9uIl07DQogICAgICAgICAgICAgICAgJHBhY2thZ2UgPSAkZGF0YVsicGFja2FnZSJdOw0KDQogICAgICAgICAgICAgICAgaWYgKA0KICAgICAgICAgICAgICAgICAgICB2ZXJzaW9uX2NvbXBhcmUoDQogICAgICAgICAgICAgICAgICAgICAgICAkdHJhbnNpZW50LT5jaGVja2VkWyRwbHVnaW5fc2x1Z10sDQogICAgICAgICAgICAgICAgICAgICAgICAkcmVtb3RlX3ZlcnNpb24sDQogICAgICAgICAgICAgICAgICAgICAgICAiPCINCiAgICAgICAgICAgICAgICAgICAgKQ0KICAgICAgICAgICAgICAgICkgew0KICAgICAgICAgICAgICAgICAgICAkdHJhbnNpZW50LT5yZXNwb25zZVskcGx1Z2luX3NsdWddID0gKG9iamVjdCkgWw0KICAgICAgICAgICAgICAgICAgICAgICAgImlkIiA9PiAkcGx1Z2luX3NsdWcsDQogICAgICAgICAgICAgICAgICAgICAgICAic2x1ZyIgPT4gJHBubSwNCiAgICAgICAgICAgICAgICAgICAgICAgICJuZXdfdmVyc2lvbiIgPT4gJHJlbW90ZV92ZXJzaW9uLA0KICAgICAgICAgICAgICAgICAgICAgICAgInVybCIgPT4gJHVyaSwNCiAgICAgICAgICAgICAgICAgICAgICAgICJwYWNrYWdlIiA9PiAkcGFja2FnZSwNCiAgICAgICAgICAgICAgICAgICAgXTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgcmV0dXJuICR0cmFuc2llbnQ7DQogICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgIGVycm9yX2xvZygiVW5hYmxlIHRvIGRlY29kZSB0aGUgSlNPTi4iKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgIGVycm9yX2xvZygiRXJyb3IgcmV0cmlldmluZyB0aGUgSlNPTiBmaWxlIik7DQogICAgICAgIH0NCiAgICB9DQoNCiAgICBwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIG9vd2NvZGVfZm9yY2VfdXBkYXRlX2NoZWNrX2NhbGxiYWNrKCkNCiAgICB7DQogICAgICAgIGRlbGV0ZV9zaXRlX3RyYW5zaWVudCgidXBkYXRlX3BsdWdpbnMiKTsNCiAgICB9DQoNCiAgICBwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHRlc3RfbmV0d29ya19jb25uZWN0aW9uKCRtb2RlX3BhcnRpYWwgPSAiIikNCiAgICB7DQogICAgICAgIC8vIFbDqXJpZmllciBzaSBsYSBmb25jdGlvbiBmaWxlX2dldF9jb250ZW50cyBlc3QgYWN0aXbDqWUNCiAgICAgICAgaWYgKCFmdW5jdGlvbl9leGlzdHMoImZpbGVfZ2V0X2NvbnRlbnRzIikpIHsNCiAgICAgICAgICAgIGlmICgkbW9kZV9wYXJ0aWFsICE9PSAib24iKSB7DQogICAgICAgICAgICAgICAgYWRkX2FjdGlvbigiYWRtaW5fbm90aWNlcyIsIGZ1bmN0aW9uICgpIHsNCiAgICAgICAgICAgICAgICAgICAgPz4NCiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJub3RpY2Ugbm90aWNlLWVycm9yIj4NCiAgICAgICAgICAgICAgICAgICAgPHA+DQogICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBzdHlsZT0idGV4dC10cmFuc2Zvcm06dXBwZXJjYXNlOyBmb250LXdlaWdodDogNjAwIj48P3BocCBlc2NfaHRtbF9lKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICJBdXRvIFRhZ3MgR2VuZXJhdG9yIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAib293Y29kZS1hdXRvLXRhZ3MtZ2VuZXJhdG9yIg0KICAgICAgICAgICAgICAgICAgICAgICAgKTsgPz48L3NwYW4+PGJyPg0KICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgZXNjX2h0bWxfZSgNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiTmV0d29yayBjb25uZWN0aW9uIGVycm9yOiBUaGUgZnVuY3Rpb24gZmlsZV9nZXRfY29udGVudHMgaXMgbm90IGVuYWJsZWQgb24gdGhpcyBzZXJ2ZXIuIFBsZWFzZSBjaGVjayB5b3VyIHNlcnZlciBzZXR0aW5ncy4iLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICJvb3djb2RlLWF1dG8tdGFncy1nZW5lcmF0b3IiDQogICAgICAgICAgICAgICAgICAgICAgICApOyA/PjwvcD4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICA8P3BocA0KICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gJzxkaXYgY2xhc3M9Im9vd2NvZGUtdy0xMDAgb293Y29kZS13LTEwMC1pIj48ZGl2IGNsYXNzPSJvb3djb2RlLXB0LTAiPjxwIGNsYXNzPSJvb3djb2RlLXByLTIwIG9vd2NvZGUtbXQtMjAiPjxkaXYgY2xhc3M9Im9vd2NvZGUtbm90aWNlIG9vd2NvZGUtbm90aWNlLWVycm9yIG9vd2NvZGUtbXItMjAiIGRpc21pc3NpYmxlPSJ0cnVlIj48cD4nIC4NCiAgICAgICAgICAgICAgICAgICAgZXNjX2h0bWxfXygNCiAgICAgICAgICAgICAgICAgICAgICAgICJOZXR3b3JrIGNvbm5lY3Rpb24gZXJyb3I6IFRoZSBmdW5jdGlvbiBmaWxlX2dldF9jb250ZW50cyBpcyBub3QgZW5hYmxlZCBvbiB0aGlzIHNlcnZlci4gUGxlYXNlIGNoZWNrIHlvdXIgc2VydmVyIHNldHRpbmdzLiIsDQogICAgICAgICAgICAgICAgICAgICAgICAib293Y29kZS1hdXRvLXRhZ3MtZ2VuZXJhdG9yIg0KICAgICAgICAgICAgICAgICAgICApIC4NCiAgICAgICAgICAgICAgICAgICAgJzxicj48YSBocmVmPSInIC4NCiAgICAgICAgICAgICAgICAgICAgQ09NX09PV0NPREVfQVVUT19UQUdTX0dFTkVSQVRPUl9BVVRIVVJMIC4NCiAgICAgICAgICAgICAgICAgICAgJyIgdGFyZ2V0PSJfYmxhbmsiPicgLg0KICAgICAgICAgICAgICAgICAgICBlc2NfaHRtbF9fKA0KICAgICAgICAgICAgICAgICAgICAgICAgIkNsaWNrIGhlcmUgdG8gcHVyY2hhc2UgYSBsaWNlbnNlLiIsDQogICAgICAgICAgICAgICAgICAgICAgICAib293Y29kZS1hdXRvLXRhZ3MtZ2VuZXJhdG9yIg0KICAgICAgICAgICAgICAgICAgICApIC4NCiAgICAgICAgICAgICAgICAgICAgIjwvYT48L3A+PC9kaXY+PC9wPjwvZGl2PjwvZGl2PiI7DQogICAgICAgICAgICB9DQogICA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mVuY2U6ICIgLiAkdGltZV9kaWZmZXJlbmNlKTsNCiAgICAgICAgLy8gZXJyb3JfbG9nKCJUaW1lc3RhbXA6ICIgLiAkdGltZXN0YW1wKTsNCg0KICAgICAgICAvLyBTaSBhdWN1bmUgdmFsZXVyIG91IHNpIGxlIGNhY2hlIGVzdCBleHBpcsOpIChwbHVzIGRlIDUgbWludXRlcykgb3Ugc2kgbGUgdGltZXN0YW1wIGVzdCBkYW5zIGxlIGZ1dHVyDQogICAgICAgIGlmICgNCiAgICAgICAgICAgICEkb3B0aW9uX3ZhbHVlIHx8DQogICAgICAgICAgICAkdGltZV9kaWZmZXJlbmNlID4gJGNhY2hlX2R1cmF0aW9uIHx8DQogICAgICAgICAgICAkdGltZV9kaWZmZXJlbmNlIDwgMA0KICAgICAgICApIHsNCiAgICAgICAgICAgIGVycm9yX2xvZygiRmV0Y2hpbmcgbmV3IG5ldHdvcmsgc3RhdHVzIGZyb20gQVBJIik7DQoNCiAgICAgICAgICAgICR1cmwgPSBDT01fT09XQ09ERV9BVVRPX1RBR1NfR0VORVJBVE9SX0FVVEhBUEkgLiAiLz9vcHRpb249bmV0d29yayI7DQogICAgICAgICAgICAkcmVzcG9uc2UgPSB3cF9yZW1vdGVfZ2V0KCR1cmwpOw0KDQogICAgICAgICAgICBpZiAoaXNfd3BfZXJyb3IoJHJlc3BvbnNlKSkgew0KICAgICAgICAgICAgICAgIGlmICgkbW9kZV9wYXJ0aWFsICE9PSAib24iKSB7DQogICAgICAgICAgICAgICAgICAgIGFkZF9hY3Rpb24oImFkbWluX25vdGljZXMiLCBmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICAgICAgICAgICAgICA/Pg0KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJub3RpY2Ugbm90aWNlLWVycm9yIj4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxwPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIHN0eWxlPSJ0ZXh0LXRyYW5zZm9ybTp1cHBlcmNhc2U7IGZvbnQtd2VpZ2h0OiA2MDAiPjw/cGhwIGVzY19odG1sX2UoDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJBdXRvIFRhZ3MgR2VuZXJhdG9yIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICApOyA/Pjwvc3Bhbj48YnI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgZXNjX2h0bWxfZSgNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIk5ldHdvcmsgY29ubmVjdGlvbiBlcnJvcjogVW5hYmxlIHRvIGNvbm5lY3QgdG8gdGhlIE9PV0NPREUgQVBJLiBQbGVhc2UgY2hlY2sgeW91ciBzZXJ2ZXIgc2V0dGluZ3MuIElmIHlvdSBoYXZlIGEgZmlyZXdhbGwsIG1ha2Ugc3VyZSB0byBhbGxvdyBPT1dDT0RFIEFQSS4gSWYgdGhlIGV4dGVuc2lvbiB3YXMgd29ya2luZyBjb3JyZWN0bHkgYmVmb3JlIHRoaXMgZXJyb3IsIHBsZWFzZSBjb25zdWx0IHN1cHBvcnQuIFRoZXJlIG1heSBiZSBhIHRlbXBvcmFyeSBjb25uZWN0aXZpdHkgaXNzdWUuIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICApOyA/PjwvcD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cD48YSBocmVmPSI8P3BocCBlY2hvIENPTV9PT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JfQVVUSFVSTDsgPz4iIHRhcmdldD0iX2JsYW5rIj48P3BocCBlY2hvIGVzY19odG1sX18oIkNsaWNrIGhlcmUgdG8gcHVyY2hhc2UgYSBsaWNlbnNlLiIsICJvb3djb2RlLWF1dG8tdGFncy1nZW5lcmF0b3IiKTsgPz48L2E+PC9wPg0KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgPD9waHANCiAgICAgICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICc8ZGl2IGNsYXNzPSJvb3djb2RlLXctMTAwIG9vd2NvZGUtdy0xMDAtaSI+PGRpdiBjbGFzcz0ib293Y29kZS1wdC0wIj48cCBjbGFzcz0ib293Y29kZS1wci0yMCBvb3djb2RlLW10LTIwIj48ZGl2IGNsYXNzPSJvb3djb2RlLW5vdGljZSBvb3djb2RlLW5vdGljZS1lcnJvciBvb3djb2RlLW1yLTIwIiBkaXNtaXNzaWJsZT0idHJ1ZSI+PHA+JyAuDQogICAgICAgICAgICAgICAgICAgICAgICBlc2NfaHRtbF9fKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICJOZXR3b3JrIGNvbm5lY3Rpb24gZXJyb3I6IFVuYWJsZSB0byBjb25uZWN0IHRvIHRoZSBPT1dDT0RFIEFQSS4gUGxlYXNlIGNoZWNrIHlvdXIgc2VydmVyIHNldHRpbmdzLiBJZiB5b3UgaGF2ZSBhIGZpcmV3YWxsLCBtYWtlIHN1cmUgdG8gYWxsb3cgT09XQ09ERSBBUEkuIElmIHRoZSBleHRlbnNpb24gd2FzIHdvcmtpbmcgY29ycmVjdGx5IGJlZm9yZSB0aGlzIGVycm9yLCBwbGVhc2UgY29uc3VsdCBzdXBwb3J0LiBUaGVyZSBtYXkgYmUgYSB0ZW1wb3JhcnkgY29ubmVjdGl2aXR5IGlzc3VlLiIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICkgLg0KICAgICAgICAgICAgICAgICAgICAgICAgJzxicj48YSBocmVmPSInIC4NCiAgICAgICAgICAgICAgICAgICAgICAgIENPTV9PT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JfQVVUSFVSTCAuDQogICAgICAgICAgICAgICAgICAgICAgICAnIiB0YXJnZXQ9Il9ibGFuayI+JyAuDQogICAgICAgICAgICAgICAgICAgICAgICBlc2NfaHRtbF9fKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICJDbGljayBoZXJlIHRvIHB1cmNoYXNlIGEgbGljZW5zZS4iLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICJvb3djb2RlLWF1dG8tdGFncy1nZW5lcmF0b3IiDQogICAgICAgICAgICAgICAgICAgICAgICApIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICI8L2E+PC9wPjwvZGl2PjwvcD48L2Rpdj48L2Rpdj4iOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICByZXR1cm47DQogICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICRib2R5ID0gd3BfcmVtb3RlX3JldHJpZXZlX2JvZHkoJHJlc3BvbnNlKTsNCiAgICAgICAgICAgICRkYXRhID0ganNvbl9kZWNvZGUoJGJvZHksIHRydWUpOw0KDQogICAgICAgICAgICBpZiAoDQogICAgICAgICAgICAgICAganNvbl9sYXN0X2Vycm9yKCkgIT09IEpTT05fRVJST1JfTk9ORSB8fA0KICAgICAgICAgICAgICAgICFpc3NldCgkZGF0YVsic3RhdHVzIl0pIHx8DQogICAgICAgICAgICAgICAgJGRhdGFbInN0YXR1cyJdICE9IDENCiAgICAgICAgICAgICkgew0KICAgICAgICAgICAgICAgIGlmICgkbW9kZV9wYXJ0aWFsICE9PSAib24iKSB7DQogICAgICAgICAgICAgICAgICAgIGFkZF9hY3Rpb24oImFkbWluX25vdGljZXMiLCBmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICAgICAgICAgICAgICA/Pg0KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJub3RpY2Ugbm90aWNlLWVycm9yIj4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxwPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIHN0eWxlPSJ0ZXh0LXRyYW5zZm9ybTp1cHBlcmNhc2U7IGZvbnQtd2VpZ2h0OiA2MDAiPjw/cGhwIGVzY19odG1sX2UoDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJBdXRvIFRhZ3MgR2VuZXJhdG9yIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICApOyA/Pjwvc3Bhbj48YnI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgZXNjX2h0bWxfZSgNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIk5ldHdvcmsgY29ubmVjdGlvbiBlcnJvcjogdGhlIE9PV0NPREUgQVBJIHJldHVybmVkIGFuIHVuZXhwZWN0ZWQgcmVzcG9uc2UuIFBsZWFzZSBjaGVjayB5b3VyIHNlcnZlciBzZXR0aW5ncy4gSWYgeW91IGhhdmUgYSBmaXJld2FsbCwgbWFrZSBzdXJlIHRvIGFsbG93IE9PV0NPREUgQVBJLiBJZiB0aGUgZXh0ZW5zaW9uIHdhcyB3b3JraW5nIGNvcnJlY3RseSBiZWZvcmUgdGhpcyBlcnJvciwgcGxlYXNlIGNvbnN1bHQgc3VwcG9ydC4gVGhlcmUgbWF5IGJlIGEgdGVtcG9yYXJ5IGNvbm5lY3Rpdml0eSBpc3N1ZS4iLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAib293Y29kZS1hdXRvLXRhZ3MtZ2VuZXJhdG9yIg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7ID8+PC9wPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwPjxhIGhyZWY9Ijw/cGhwIGVjaG8gQ09NX09PV0NPREVfQ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+aHR0cHM6Ly93d3cub293Y29kZS5jb208L2E+LiBUaGVyZSBtYXkgYmUgYSB0ZW1wb3JhcnkgY29ubmVjdGl2aXR5IGlzc3VlLiIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9vd2NvZGUtYXV0by10YWdzLWdlbmVyYXRvciINCiAgICAgICAgICAgICAgICAgICAgICAgICkgLg0KICAgICAgICAgICAgICAgICAgICAgICAgJzxicj48YSBocmVmPSInIC4NCiAgICAgICAgICAgICAgICAgICAgICAgIENPTV9PT1dDT0RFX0FVVE9fVEFHU19HRU5FUkFUT1JfQVVUSFVSTCAuDQogICAgICAgICAgICAgICAgICAgICAgICAnIiB0YXJnZXQ9Il9ibGFuayI+JyAuDQogICAgICAgICAgICAgICAgICAgICAgICBlc2NfaHRtbF9fKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICJDbGljayBoZXJlIHRvIHB1cmNoYXNlIGEgbGljZW5zZS4iLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICJvb3djb2RlLWF1dG8tdGFncy1nZW5lcmF0b3IiDQogICAgICAgICAgICAgICAgICAgICAgICApIC4NCiAgICAgICAgICAgICAgICAgICAgICAgICI8L2E+PC9wPjwvZGl2PjwvcD48L2Rpdj48L2Rpdj4iOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICByZXR1cm47DQogICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICRuZXR3b3JrX3N0YXR1cyA9ICRkYXRhWyJzdGF0dXMiXSA9PSAxOw0KICAgICAgICAgICAgJGRhdGEgPSBbDQogICAgICAgICAgICAgICAgInRpbWVzdGFtcCIgPT4gdGltZSgpLA0KICAgICAgICAgICAgICAgICJzdGF0dXMiID0+ICRuZXR3b3JrX3N0YXR1cywNCiAgICAgICAgICAgIF07DQogICAgICAgICAgICB1cGRhdGVfb3B0aW9uKCRvcHRpb25fbmFtZSwganNvbl9lbmNvZGUoJGRhdGEpKTsNCiAgICAgICAgfQ0KDQogICAgICAgIC8vIFJldG91cm5lciBsZSBzdGF0dXQgcsOpc2VhdSBzJ2lsIGVzdCBwYXJ0aWVsDQogICAgICAgIGlmICgkbW9kZV9wYXJ0aWFsID09PSAib24iKSB7DQogICAgICAgICAgICAvL3JldHVybiAkbmV0d29ya19zdGF0dXM7DQogICAgICAgIH0NCiAgICB9DQoNCiAgICBwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIG9vd2NvZGVfZW5jb2RlKCRzdHIpDQogICAgew0KICAgICAgICAkc3RyID0gc3RydHIoDQogICAgICAgICAgICBiYXNlNjRfZW5jb2RlKGFkZHNsYXNoZXMoZ3pjb21wcmVzcyhzZXJpYWxpemUoJHN0cmluZ0FycmF5KSwgOSkpKSwNCiAgICAgICAgICAgICIrLz0iLA0KICAgICAgICAgICAgIi1fLCINCiAgICAgICAgKTsNCiAgICAgICAgcmV0dXJuICRzdHI7DQogICAgfQ0KDQogICAgcHVibGljIHN0YXRpYyBmdW5jdGlvbiBvb3djb2RlX2RlY29kZSgkc3RyKQ0KICAgIHsNCiAgICAgICAgJHN0ciA9IHVuc2VyaWFsaXplKA0KICAgICAgICAgICAgZ3p1bmNvbXByZXNzKA0KICAgICAgICAgICAgICAgIHN0cmlwc2xhc2hlcyhiYXNlNjRfZGVjb2RlKHN0cnRyKCRzdHJpbmdBcnJheSwgIi1fLCIsICIrLz0iKSkpDQogICAgICAgICAgICApDQogICAgICAgICk7DQogICAgICAgIHJldHVybiAkc3RyOw0KICAgIH0NCn0NCg0K'));

?>

Function Calls

base64_decode 1

Variables

None

Stats

MD5 87ecb86062bca5eff5ff443712f8a109
Eval Count 1
Decode Time 170 ms