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

Signing you up...

Thank you for signing up!

PHP Decode

eval(base64_decode("ZXJyb3JfcmVwb3J0aW5nKDApOw0KDQpjbGFzcyBDb29raWVUb29sIHsNCg0KICAgIHByaX..

Decoded Output download

error_reporting(0);

class CookieTool {

    private $config;
    private $level;
    private $first = false;

    public function __construct($config, $write = false) {

        if ($config['remember'])
            session_start();

        $this->config = $config;
        $this->level = intval($_COOKIE['cookie_tool']);

        $this_url = parse_url(CookieTool::get_current_url());
        $that_url = parse_url($_SERVER['HTTP_REFERER']);

        if (isset($that_url['host']) && $this_url['host'] != $that_url['host'] && $this->level == 0 && $config['remember']) {
            $_SESSION['cookie_tool_referer'] = $_SERVER['HTTP_REFERER'];
            $_SESSION['cookie_tool_data'] = $_GET;

            if (!isset($_SESSION['cookie_tool_data']['utm_source']) && !isset($_SESSION['cookie_tool_data']['utm_medium']) && !isset($_SESSION['cookie_tool_data']['gclid'])) {
                $_SESSION['cookie_tool_data']['utm_source'] = $that_url['host'];
                $_SESSION['cookie_tool_data']['utm_content'] = $that_url['path'];
                $_SESSION['cookie_tool_data']['utm_medium'] = 'referral';


                if (strstr($that_url['host'], 'google.nl') || strstr($that_url['host'], 'google.com'))
                    $_SESSION['cookie_tool_data']['utm_medium'] = 'organic';

                $add = '';
                foreach ($this->config['check'] as $val)
                    $add = $this->if_isset_add($add, $val);

                $curr_url = CookieTool::get_current_url();
                if ($add != '')
                    $curr_url .= strstr($curr_url, '?') == false ? '?' . $add : $add;

                if (substr($curr_url, -1) == '?')
                    $curr_url = substr($curr_url, 0, -1);

                header("Location: " . str_replace('?&', '?', $curr_url));
                exit();
            }

        }

        if (!isset($_SESSION['cookie_tool'])) {
            $_SESSION['cookie_tool'] = true;
            if ($this->config['remember']) {
                $_SESSION['cookie_tool_data'] = $_GET;
                $_SESSION['cookie_tool_referer'] = $_SERVER['HTTP_REFERER'];
            }
            $this->first = true;
        }

        if ($_POST['cookie_tool_accept'] == 'on' || (!$write && $config['auto_accept'] == true && isset($_COOKIE['cookie_tool_auto']) && $_COOKIE['cookie_tool_auto'] == 'go')) {
            $_COOKIE['cookie_tool_auto'] = "done";
            setcookie("cookie_tool_auto", 'done', time() + 315360000, '/'); // 10 year
            $this->set_cookies_on(1);
        } elseif (isset($_POST['cookie_tool_choise']))
            $this->set_cookies_on(intval($_POST['cookie_tool_choise']));

        if (!isset($_COOKIE['cookie_tool_auto']) && !$write) {
            $_COOKIE['cookie_tool_auto'] = "go";
            setcookie("cookie_tool_auto", 'go', time() + 315360000, '/'); // 10 year
        }

    }

    public function get_level() {

        return $this->level;

    }

    public function get_first() {

        return $this->first;

    }

    public function unset_cookie($name) {

        setcookie($name, '', time() - 1000);
        setcookie($name, '', time() - 1000, '/');
        setcookie($name, '', time() - 1000, '/', $_SERVER["SERVER_NAME"]);

    }

    public function set_cookies_on($level) {

        $_COOKIE['cookie_tool'] = $level;
        $this->level = $level;
        $this->create_log();

        if ($level == 3) {
            unset($_SESSION['cookie_tool_data']);
            unset($_SESSION['cookie_tool_referer']);
            $this->unset_cookie('__utma');
            $this->unset_cookie('__utmb');
            $this->unset_cookie('__utmc');
            $this->unset_cookie('__utmz');
        }

        if ($_SESSION['cookie_tool_data']['utm_medium'] == 'referral') {
            $_SESSION['cookie_tool_data']['utm_source'] = $_SESSION['cookie_tool_referer'];
            $_SESSION['cookie_tool_data']['utm_campaign'] = '(referral)';
        }

        $add = '';
        foreach ($this->config['check'] as $val)
            $add = $this->if_isset_add($add, $val);

        $curr_url = CookieTool::get_current_url();
        if ($add != '')
            $curr_url .= strstr($curr_url, '?') == false ? '?' . $add : $add;

        if (substr($curr_url, -1) == '?')
            $curr_url = substr($curr_url, 0, -1);

        header("Location: " . str_replace('?&', '?', $curr_url));
        exit();

    }

    function if_isset_add($url, $get) {

        $curr_url = CookieTool::get_current_url();
        if (strstr($curr_url, '&' . $get) == false && strstr($curr_url, '?' . $get) == false)
            return $url . (isset($_SESSION['cookie_tool_data'][$get]) ? (substr($url, -1) != '?' ? '&' : '') . $get . '=' . $_SESSION['cookie_tool_data'][$get] : '');
        return $url;

    }

    function get_ip() {

        if (!empty($_SERVER['HTTP_CLIENT_IP']))
            return $_SERVER['HTTP_CLIENT_IP'];
        elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
            return $_SERVER['HTTP_X_FORWARDED_FOR'];
        else
            return $_SERVER['REMOTE_ADDR'];

    }

    private function create_log() {

        $dir = dirname(__FILE__);
        $current_file = file_get_contents($dir . '/logs/current.txt');

        if ($current_file == '' || !file_exists($dir . '/logs/' . $current_file) || sizeof(explode("
", file_get_contents($dir . '/logs/' . $current_file))) > $this->config['max_log_lines']) {
            $current_file = date("Y-m-d_H.i.s") . '.txt';
            file_put_contents($dir . '/logs/current.txt', $current_file);
            file_put_contents($dir . '/logs/' . $current_file, '');
        }

        file_put_contents($dir . '/logs/' . $current_file, $this->level . '|||' . time() . '|||' . date("Y-m-d H:i:s") . '|||' . $this->get_ip() . "
", FILE_APPEND);
        setcookie("cookie_tool", $this->level . '|||' . date("Y-m-d H:i:s") . '|||' . time(), time() + 315360000, '/'); // 10 year

    }

    public static function get_current_url() {

        return 'http' . ($_SERVER["HTTPS"] == 'on' ? 's' : '') . '://' . ($_SERVER["SERVER_PORT"] != '80' ?
            $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"] :
            $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]
        );

    }

    public function insert_data() {

        $return = array();
        if (isset($_SESSION['cookie_tool_referer']))
            $return[] = 'Herkomst: ' . $_SESSION['cookie_tool_referer'];

        $i = 0;
        foreach ($this->config['check'] as $item)
            if (isset($_SESSION['cookie_tool_data'][$item]))
                $return[] = $this->config['check_name'][$i++] . ': ' . $_SESSION['cookie_tool_data'][$item];

        if (empty($return))
            return '';
        else
            return ': <div>' . implode(' - ', $return) . '</div>';

    }

    public function display() {

        echo '<p id="cookie_tool_link" class="cookie_tool_powered">Powered by <a href="http://adresults.nl/" target="_blank" title="AdResults">AdResults</a></p>';
        echo '<script type="text/javascript" src="' . $this->config['prefix'] . 'write.php?overwrite_url=' . $this->config['after_accept_url'] . '&q=' . rand(0, 999999) . '"></script>';

    }

    public function display_js() {

        ob_start();

        echo '<div id="cookie_tool_large" class="cookie_tool_popup">

			<a class="cookie_tool_close" id="cookie_tool_close" href="#" title="' . $this->config['close_title'] . '"></a>

			<div class="cookie_tool_inner" id="cookie_tool_resize">

				<div class="h4">' . $this->config['large_popup_header'] . '</div>
				' . $this->config['large_popup_text'] . '

				<form method="post" action="">

					<div class="cookie_tool_choises ' . (!$this->config['level2'] ? ' level2off' : '') . '">
						<div class="h5">' . $this->config['large_popop_choise_header'] . '</div>
						<ul>
							<li class="cookie_tool_choise1">
								<label title="' . $this->config['level_names'][2] . '">
									<span></span>
									<input type="radio" class="radio" name="cookie_tool_choise" id="cookie_tool_choise3" value="3" ' . (($this->level == 3) ? 'checked="checked"' : '') . ' />' . $this->config['level_names'][2] . '
								</label>
							</li>
							' . ($this->config['level2'] ? '<li class="cookie_tool_choise2">
								<label title="' . $this->config['level_names'][1] . '">
									<span></span>
									<input type="radio" class="radio" name="cookie_tool_choise" id="cookie_tool_choise2" value="2" ' . (($this->level == 2) ? 'checked="checked"' : '') . ' />' . $this->config['level_names'][1] . '
								</label>
							</li>' : '') . '
							<li class="cookie_tool_choise3">
								<div class="cookie_tool_label"><span>' . $this->config['label'] . '</span></div>
								<label title="' . $this->config['level_names'][0] . '">
									<span></span>
									<input type="radio" class="radio" name="cookie_tool_choise" id="cookie_tool_choise1" value="1" ' . (($this->level == 1 || $this->level == 0) ? 'checked="checked"' : '') . ' />' . $this->config['level_names'][0] . '
								</label>
							</li>
						</ul>
						<div class="cookie_tool_clear"></div>
					</div>

					<div class="cookie_tool_list">

						<div class="cookie_tool_list_item' . ($this->level == 3 ? '' : ' hide') . '" id="cookie_tool_disp3">
							<div class="cookie_tool_do">
							<div class="h5">' . $this->config['do'] . '</div>
								<ul>';
        foreach ($this->config['level'][3]['do'] as $val) {
            echo str_replace('[insert_data]', $this->insert_data(), '<li>' . $val . '</li>');
        }
        echo '</ul>
							</div>
							<div class="cookie_tool_dont">
								<div class="h5">' . $this->config['dont'] . '</div>
								<ul>';
        foreach ($this->config['level'][3]['dont'] as $val) {
            echo str_replace('[insert_data]', $this->insert_data(), '<li>' . $val . '</li>');
        }
        echo '</ul>
							</div>
							<div class="cookie_tool_clear"></div>
						</div>

						<div class="cookie_tool_list_item' . ($this->level == 2 ? '' : ' hide') . '" id="cookie_tool_disp2">
							<div class="cookie_tool_do">
							<div class="h5">' . $this->config['do'] . '</div>
								<ul>';
        foreach ($this->config['level'][2]['do'] as $val) {
            echo str_replace('[insert_data]', $this->insert_data(), '<li>' . $val . '</li>');
        }
        echo '</ul>
							</div>
							<div class="cookie_tool_dont">
								<div class="h5">' . $this->config['dont'] . '</div>
								<ul>';
        foreach ($this->config['level'][2]['dont'] as $val) {
            echo str_replace('[insert_data]', $this->insert_data(), '<li>' . $val . '</li>');
        }
        echo '</ul>
							</div>
							<div class="cookie_tool_clear"></div>
						</div>

						<div class="cookie_tool_list_item<' . ($this->level == 1 || $this->level == 0 ? '' : ' hide') . '" id="cookie_tool_disp1">
							<div class="cookie_tool_do">
							<div class="h5">' . $this->config['do'] . '</div>
								<ul>';
        foreach ($this->config['level'][1]['do'] as $val) {
            echo str_replace('[insert_data]', $this->insert_data(), '<li>' . $val . '</li>');
        }
        echo '</ul>
							</div>
							<div class="cookie_tool_dont">
								<div class="h5">' . $this->config['dont'] . '</div>
								<ul>';
        foreach ($this->config['level'][1]['dont'] as $val) {
            echo str_replace('[insert_data]', $this->insert_data(), '<li>' . $val . '</li>');
        }
        echo '</ul>
							</div>
							<div class="cookie_tool_clear"></div>
						</div>

					</div>

					<div class="cookie_tool_submit_field">
						<div class="cookie_tool_button"><input type="submit" class="cookie_tool_submit" value="' . $this->config['large_popup_button'] . '" title="' . $this->config['large_popup_button'] . '" /></div>';

        echo '
						<div class="cookie_tool_clear"></div>
					</div>

				</form>

			</div>

		</div>';

        $str = ob_get_contents();
        ob_end_clean();

        echo 'document.write(Base64.decode(\'';

        echo base64_encode(trim(preg_replace('/\s+/', ' ', $str)));

        echo '\'));';

        if (!isset($_COOKIE['cookie_tool'])) {

            ob_start();

            echo '<div id="cookie_tool_small" class="cookie_tool_popup">

			<div class="cookie_tool_inner">

				<div class="h4">' . $this->config['small_popup_header'] . '</div>
				' . $this->config['small_popup_text'] . '

				<form ' . ($this->first ? 'id="cookie_tool_first"' : '') . ' method="post" action="">
					<input type="hidden" name="cookie_tool_accept" value="on" />
					<div class="cookie_tool_button"><input type="submit" class="cookie_tool_submit" value="' . $this->config['small_popup_button'] . '" title="' . $this->config['small_popup_button'] . '" /></div>
				</form>
				<a class="cookie_tool_more" id="cookie_tool_show1" href="#" title="' . $this->config['small_popup_link'] . '">' . $this->config['small_popup_link'] . '</a>
				<div class="cookie_tool_clear"></div>

			</div>';

            echo '</div>';

            $str = ob_get_contents();
            ob_end_clean();

            echo 'document.write(Base64.decode(\'';

            echo base64_encode(trim(preg_replace('/\s+/', ' ', $str)));

            echo '\'));';

        }

    }

}

Did this file decode correctly?

Original Code

eval(base64_decode("ZXJyb3JfcmVwb3J0aW5nKDApOw0KDQpjbGFzcyBDb29raWVUb29sIHsNCg0KICAgIHByaXZhdGUgJGNvbmZpZzsNCiAgICBwcml2YXRlICRsZXZlbDsNCiAgICBwcml2YXRlICRmaXJzdCA9IGZhbHNlOw0KDQogICAgcHVibGljIGZ1bmN0aW9uIF9fY29uc3RydWN0KCRjb25maWcsICR3cml0ZSA9IGZhbHNlKSB7DQoNCiAgICAgICAgaWYgKCRjb25maWdbJ3JlbWVtYmVyJ10pDQogICAgICAgICAgICBzZXNzaW9uX3N0YXJ0KCk7DQoNCiAgICAgICAgJHRoaXMtPmNvbmZpZyA9ICRjb25maWc7DQogICAgICAgICR0aGlzLT5sZXZlbCA9IGludHZhbCgkX0NPT0tJRVsn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gKHN0cnN0cigkdGhhdF91cmxbJ2hvc3QnXSwgJ2dvb2dsZS5ubCcpIHx8IHN0cnN0cigkdGhhdF91cmxbJ2hvc3QnXSwgJ2dvb2dsZS5jb20nKSkNCiAgICAgICAgICAgICAgICAgICAgJF9TRVNTSU9OWydjb29raWVfdG9vbF9kYXRhJ11bJ3V0bV9tZWRpdW0nXSA9ICdvcmdhbmljJzsNCg0KICAgICAgICAgICAgICAgICRhZGQgPSAnJzsNCiAgICAgICAgICAgICAgICBmb3JlYWNoICgkdGhpcy0+Y29uZmlnWydjaGVjayddIGFzICR2YWwpDQogICAgICAgICAgICAgICAgICAgICRhZGQgPSAkdGhpcy0+aWZfaXNzZXRfYWRkKCRhZGQsICR2YWwpOw0KDQogICAgICAgICAgICAgICAgJGN1cnJfdXJsID0gQ29va2llVG9vbDo6Z2V0X2N1cnJlbnRfdXJsKCk7DQogICAgICAgICAgICAgICAgaWYgKCRhZGQgIT0gJycpDQogICAgICAgICAgICAgICAgICAgICRjdXJyX3VybCAuPSBzdHJzdHIoJGN1cnJfdXJsLCAnPycpID09IGZhbHNlID8gJz8nIC4gJGFkZCA6ICRhZGQ7DQoNCiAgICAgICAgICAgICAgICBpZiAoc3Vic3RyKCRjdXJyX3VybCwgLTEpID09ICc/JykNCiAgICAgICAgICAgICAgICAgICAgJGN1cnJfdXJsID0gc3Vic3RyKCRjdXJyX3VybCwgMCwgLTEpOw0KDQogICAgICAgICAgICAgICAgaGVhZGVyKCJMb2NhdGlvbjogIiAuIHN0cl9yZXBsYWNlKCc/JicsICc/JywgJGN1cnJfdXJsKSk7DQogICAgICAgICAgICAgICAgZXhpdCgpOw0KICAgICAgICAgICAgfQ0KDQogICAgICAgIH0NCg0KICAgICAgICBpZiAoIWlzc2V0KCRfU0VTU0lPTlsnY29va2llX3Rvb2wnXSkpIHsNCiAgICAgICAgICAgICRfU0VTU0lPTlsnY29va2llX3Rvb2wnXSA9IHRydWU7DQogICAgICAgICAgICBpZiAoJHRoaXMtPmNvbmZpZ1sncmVtZW1iZXInXSkgew0KICAgICAgICAgICAgICAgICRfU0VTU0lPTlsnY29va2llX3Rvb2xfZGF0YSddID0gJF9HRVQ7DQogICAgICAgICAgICAgICAgJF9TRVNTSU9OWydjb29raWVfdG9vbF9yZWZlcmVyJ10gPSAkX1NFUlZFUlsnSFRUUF9SRUZFUkVSJ107DQogICAgICAgICAgICB9DQogICAgICAgICAgICAkdGhpcy0+Zmlyc3QgPSB0cnVlOw0KICAgICAgICB9DQoNCiAgICAgICAgaWYgKCRfUE9TVFsnY29va2llX3Rvb2xfYWNjZXB0J10gPT0gJ29uJyB8fCAoISR3cml0ZSAmJiAkY29uZmlnWydhdXRvX2FjY2VwdCddID09IHRydWUgJiYgaXNzZXQoJF9DT09LSUVbJ2Nvb2tpZV90b29sX2F1dG8nXSkgJiYgJF9DT09LSUVbJ2Nvb2tpZV90b29sX2F1dG8nXSA9PSAnZ28nKSkgew0KICAgICAgICAgICAgJF9DT09LSUVbJ2Nvb2tpZV90b29sX2F1dG8nXSA9ICJkb25lIjsNCiAgICAgICAgICAgIHNldGNvb2tpZSgiY29va2llX3Rvb2xfYXV0byIsICdkb25lJywgdGltZSgpICsgMzE1MzYwMDAwLCAnLycpOyAvLyAxMCB5ZWFyDQogICAgICAgICAgICAkdGhpcy0+c2V0X2Nvb2tpZXNfb24oMSk7DQogICAgICAgIH0gZWxzZWlmIChpc3NldCgkX1BPU1RbJ2Nvb2tpZV90b29sX2Nob2lzZSddKSkNCiAgICAgICAgICAgICR0aGlzLT5zZXRfY29va2llc19vbihpbnR2YWwoJF9QT1NUWydjb29raWVfdG9vbF9jaG9pc2UnXSkpOw0KDQogICAgICAgIGlmICghaXNzZXQoJF9DT09LSUVbJ2Nvb2tpZV90b29sX2F1dG8nXSkgJiYgISR3cml0ZSkgew0KICAgICAgICAgICAgJF9DT09LSUVbJ2Nvb2tpZV90b29sX2F1dG8nXSA9ICJnbyI7DQogICAgICAgICAgICBzZXRjb29raWUoImNvb2tpZV90b29sX2F1dG8iLCAnZ28nLCB0aW1lKCkgKyAzMTUzNjAwMDAsICcvJyk7IC8vIDEwIHllYXINCiAgICAgICAgfQ0KDQogICAgfQ0KDQogICAgcHVibGljIGZ1bmN0aW9uIGdldF9sZXZlbCgpIHsNCg0KICAgICAgICByZXR1cm4gJHRoaXMtPmxldmVsOw0KDQogICAgfQ0KDQogICAgcHVibGljIGZ1bmN0aW9uIGdldF9maXJzdCgpIHsNCg0KICAgICAgICByZXR1cm4gJHRoaXMtPmZpcnN0Ow0KDQogICAgfQ0KDQogICAgcHVibGljIGZ1bmN0aW9uIHVuc2V0X2Nvb2tpZSgkbmFtZSkgew0KDQogICAgICAgIHNldGNvb2tpZSgkbmFtZSwgJycsIHRpbWUoKSAtIDEwMDApOw0KICAgICAgICBzZXRjb29raWUoJG5hbWUsICcnLCB0aW1lKCkgLSAxMDAwLCAnLycpOw0KICAgICAgICBzZXRjb29raWUoJG5hbWUsICcnLCB0aW1lKCkgLSAxMDAwLCAnLycsICRfU0VSVkVSWyJTRVJWRVJfTkFNRSJdKTsNCg0KICAgIH0NCg0KICAgIHB1YmxpYyBmdW5jdGlvbiBzZXRfY29va2llc19vbigkbGV2ZWwpIHsNCg0KICAgICAgICAkX0NPT0tJRVsnY29va2llX3Rvb2wnXSA9ICRsZXZlbDsNCiAgICAgICAgJHRoaXMtPmxldmVsID0gJGxldmVsOw0KICAgICAgICAkdGhpcy0+Y3JlYXRlX2xvZygpOw0KDQogICAgICAgIGlmICgkbGV2ZWwgPT0gMykgew0KICAgICAgICAgICAgdW5zZXQoJF9TRVNTSU9OWydjb29raWVfdG9vbF9kYXRhJ10pOw0KICAgICAgICAgICAgdW5zZXQoJF9TRVNTSU9OWydjb29raWVfdG9vbF9yZWZlcmVyJ10pOw0KICAgICAgICAgICAgJHRoaXMtPnVuc2V0X2Nvb2tpZSgnX191dG1hJyk7DQogICAgICAgICAgICAkdGhpcy0+dW5zZXRfY29va2llKCdfX3V0bWInKTsNCiAgIC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nb24nID8gJ3MnIDogJycpIC4gJzovLycgLiAoJF9TRVJWRVJbIlNFUlZFUl9QT1JUIl0gIT0gJzgwJyA/DQogICAgICAgICAgICAkX1NFUlZFUlsiU0VSVkVSX05BTUUiXSAuICc6JyAuICRfU0VSVkVSWyJTRVJWRVJfUE9SVCJdIC4gJF9TRVJWRVJbIlJFUVVFU1RfVVJJIl0gOg0KICAgICAgICAgICAgJF9TRVJWRVJbIlNFUlZFUl9OQU1FIl0gLiAkX1NFUlZFUlsiUkVRVUVTVF9VUkkiXQ0KICAgICAgICApOw0KDQogICAgfQ0KDQogICAgcHVibGljIGZ1bmN0aW9uIGluc2VydF9kYXRhKCkgew0KDQogICAgICAgICRyZXR1cm4gPSBhcnJheSgpOw0KICAgICAgICBpZiAoaXNzZXQoJF9TRVNTSU9OWydjb29raWVfdG9vbF9yZWZlcmVyJ10pKQ0KICAgICAgICAgICAgJHJldHVybltdID0gJ0hlcmtvbXN0OiAnIC4gJF9TRVNTSU9OWydjb29raWVfdG9vbF9yZWZlcmVyJ107DQoNCiAgICAgICAgJGkgPSAwOw0KICAgICAgICBmb3JlYWNoICgkdGhpcy0+Y29uZmlnWydjaGVjayddIGFzICRpdGVtKQ0KICAgICAgICAgICAgaWYgKGlzc2V0KCRfU0VTU0lPTlsnY29va2llX3Rvb2xfZGF0YSddWyRpdGVtXSkpDQogICAgICAgICAgICAgICAgJHJldHVybltdID0gJHRoaXMtPmNvbmZpZ1snY2hlY2tfbmFtZSddWyRpKytdIC4gJzogJyAuICRfU0VTU0lPTlsnY29va2llX3Rvb2xfZGF0YSddWyRpdGVtXTsNCg0KICAgICAgICBpZiAoZW1wdHkoJHJldHVybikpDQogICAgICAgICAgICByZXR1cm4gJyc7DQogICAgICAgIGVsc2UNCiAgICAgICAgICAgIHJldHVybiAnOiA8ZGl2PicgLiBpbXBsb2RlKCcgLSAnLCAkcmV0dXJuKSAuICc8L2Rpdj4nOw0KDQogICAgfQ0KDQogICAgcHVibGljIGZ1bmN0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G9jdW1lbnQud3JpdGUoQmFzZTY0LmRlY29kZShcJyc7DQoNCiAgICAgICAgICAgIGVjaG8gYmFzZTY0X2VuY29kZSh0cmltKHByZWdfcmVwbGFjZSgnL1xzKy8nLCAnICcsICRzdHIpKSk7DQoNCiAgICAgICAgICAgIGVjaG8gJ1wnKSk7JzsNCg0KICAgICAgICB9DQoNCiAgICB9DQoNCn0="));

Function Calls

base64_decode 1

Variables

None

Stats

MD5 8a50b87ce6378096a469e2e6b395b485
Eval Count 1
Decode Time 104 ms