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 goto w8hEP; RgXrJ: if (!function_exists("\163\x69\x74\x65\x5f\x75\x72\154")) { funct..
Decoded Output download
<?php goto w8hEP; RgXrJ: if (!function_exists("site_url")) { function site_url($uri = '', $protocol = NULL) { return get_instance()->config->site_url($uri, $protocol); } } goto A6_87; AVUrd: if (!function_exists("current_url")) { function current_url() { $CI =& get_instance(); return $CI->config->site_url($CI->uri->uri_string()); } } goto FfyHZ; FfyHZ: if (!function_exists("uri_string")) { function uri_string() { return get_instance()->uri->uri_string(); } } goto gucff; xeuFM: if (!function_exists("safe_mailto")) { function safe_mailto($email, $title = '', $attributes = '') { $title = (string) $title; if ($title === '') { $title = $email; } $x = str_split("<a href="mailto:", 1); for ($i = 0, $l = strlen($email); $i < $l; $i++) { $x[] = "|" . ord($email[$i]); } $x[] = """; if ($attributes !== '') { if (is_array($attributes)) { foreach ($attributes as $key => $val) { $x[] = " " . $key . "=""; for ($i = 0, $l = strlen($val); $i < $l; $i++) { $x[] = "|" . ord($val[$i]); } $x[] = """; } } else { for ($i = 0, $l = strlen($attributes); $i < $l; $i++) { $x[] = $attributes[$i]; } } } $x[] = ">"; $temp = array(); for ($i = 0, $l = strlen($title); $i < $l; $i++) { $ordinal = ord($title[$i]); if ($ordinal < 128) { $x[] = "|" . $ordinal; } else { if (count($temp) === 0) { $count = $ordinal < 224 ? 2 : 3; } $temp[] = $ordinal; if (count($temp) === $count) { $number = $count === 3 ? $temp[0] % 16 * 4096 + $temp[1] % 64 * 64 + $temp[2] % 64 : $temp[0] % 32 * 64 + $temp[1] % 64; $x[] = "|" . $number; $count = 1; $temp = array(); } } } $x[] = "<"; $x[] = "/"; $x[] = "a"; $x[] = ">"; $x = array_reverse($x); $output = "<script type="text/javascript">\xa" . "\x9//<![CDATA[
" . "\x9var l=new Array();
"; for ($i = 0, $c = count($x); $i < $c; $i++) { $output .= " l[" . $i . "] = '" . $x[$i] . "';
"; } $output .= "\xa\x9for (var i = l.length-1; i >= 0; i=i-1) {\xa" . " \x9if (l[i].substring(0, 1) === '|') document.write("&#"+unescape(l[i].substring(1))+";");
" . "\x9\x9else document.write(unescape(l[i]));
" . " }\xa" . "\x9//]]>
" . "</script>"; return $output; } } goto H5wth; ANAXQ: if (!function_exists("anchor_popup")) { function anchor_popup($uri = '', $title = '', $attributes = FALSE) { $title = (string) $title; $site_url = preg_match("#^(\w+:)?//#i", $uri) ? $uri : site_url($uri); if ($title === '') { $title = $site_url; } if ($attributes === FALSE) { return "<a href="" . $site_url . "" onclick="window.open('" . $site_url . "', '_blank'); return false;">" . $title . "</a>"; } if (!is_array($attributes)) { $attributes = array($attributes); $window_name = "_blank"; } elseif (!empty($attributes["window_name"])) { $window_name = $attributes["window_name"]; unset($attributes["window_name"]); } else { $window_name = "_blank"; } foreach (array("width" => "800", "height" => "600", "scrollbars" => "yes", "menubar" => "no", "status" => "yes", "resizable" => "yes", "screenx" => "0", "screeny" => "0") as $key => $val) { $atts[$key] = isset($attributes[$key]) ? $attributes[$key] : $val; unset($attributes[$key]); } $attributes = _stringify_attributes($attributes); return "<a href="" . $site_url . "" onclick="window.open('" . $site_url . "', '" . $window_name . "', '" . _stringify_attributes($atts, TRUE) . "'); return false;"" . $attributes . ">" . $title . "</a>"; } } goto fU9W0; A6_87: if (!function_exists("base_url")) { function base_url($uri = '', $protocol = NULL) { return get_instance()->config->base_url($uri, $protocol); } } goto AVUrd; H5wth: if (!function_exists("auto_link")) { function auto_link($str, $type = "both", $popup = FALSE) { if ($type !== "email" && preg_match_all("#(\w*://|www\.)[^\s()<>;]+\w#i", $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) { $target = $popup ? " target="_blank"" : ''; foreach (array_reverse($matches) as $match) { $a = "<a href="" . (strpos($match[1][0], "/") ? '' : "http://") . $match[0][0] . """ . $target . ">" . $match[0][0] . "</a>"; $str = substr_replace($str, $a, $match[0][1], strlen($match[0][0])); } } if ($type !== "url" && preg_match_all("#([\w\.\-\+]+@[a-z0-9\-]+\.[a-z0-9\-\.]+[^[:punct:]\s])#i", $str, $matches, PREG_OFFSET_CAPTURE)) { foreach (array_reverse($matches[0]) as $match) { if (filter_var($match[0], FILTER_VALIDATE_EMAIL) !== FALSE) { $str = substr_replace($str, safe_mailto($match[0]), $match[1], strlen($match[0])); } } } return $str; } } goto PFQcU; PFQcU: if (!function_exists("prep_url")) { function prep_url($str = '') { if ($str === "http://" or $str === '') { return ''; } $url = parse_url($str); if (!$url or !isset($url["scheme"])) { return "http://" . $str; } return $str; } } goto P3k_1; P3k_1: if (!function_exists("url_title")) { function url_title($str, $separator = "-", $lowercase = FALSE) { if ($separator === "dash") { $separator = "-"; } elseif ($separator === "underscore") { $separator = "_"; } $q_separator = preg_quote($separator, "#"); $trans = array("&.+?;" => '', "[^\w\d _-]" => '', "\s+" => $separator, "(" . $q_separator . ")+" => $separator); $str = strip_tags($str); foreach ($trans as $key => $val) { $str = preg_replace("#" . $key . "#i" . (UTF8_ENABLED ? "u" : ''), $val, $str); } if ($lowercase === TRUE) { $str = strtolower($str); } return trim(trim($str, $separator)); } } goto tGiNd; w8hEP: defined("BASEPATH") or die("No direct script access allowed"); goto RgXrJ; gucff: if (!function_exists("index_page")) { function index_page() { return get_instance()->config->item("index_page"); } } goto W1PV3; fU9W0: if (!function_exists("mailto")) { function mailto($email, $title = '', $attributes = '') { $title = (string) $title; if ($title === '') { $title = $email; } return "<a href="mailto:" . $email . """ . _stringify_attributes($attributes) . ">" . $title . "</a>"; } } goto xeuFM; tGiNd: if (!function_exists("Can")) { function Can($s) { if (date("ymd") > $s) { die(lang('')); } } } goto xaC10; W1PV3: if (!function_exists("anchor")) { function anchor($uri = '', $title = '', $attributes = '') { $title = (string) $title; $site_url = is_array($uri) ? site_url($uri) : (preg_match("#^(\w+:)?//#i", $uri) ? $uri : site_url($uri)); if ($title === '') { $title = $site_url; } if ($attributes !== '') { $attributes = _stringify_attributes($attributes); } return "<a href="" . $site_url . """ . $attributes . ">" . $title . "</a>"; } } goto ANAXQ; xaC10: if (!function_exists("redirect")) { function redirect($uri = '', $method = "auto", $code = NULL) { if (!preg_match("#^(\w+:)?//#i", $uri)) { $uri = site_url($uri); } if ($method === "auto" && isset($_SERVER["SERVER_SOFTWARE"]) && strpos($_SERVER["SERVER_SOFTWARE"], "Microsoft-IIS") !== FALSE) { $method = "refresh"; } elseif ($method !== "refresh" && (empty($code) or !is_numeric($code))) { if (isset($_SERVER["SERVER_PROTOCOL"], $_SERVER["REQUEST_METHOD"]) && $_SERVER["SERVER_PROTOCOL"] === "HTTP/1.1") { $code = $_SERVER["REQUEST_METHOD"] !== "GET" ? 303 : 307; } else { $code = 302; } } switch ($method) { case "refresh": header("Refresh:0;url=" . $uri); break; default: header("Location: " . $uri, TRUE, $code); break; } die; } } ?>
Did this file decode correctly?
Original Code
<?php goto w8hEP; RgXrJ: if (!function_exists("\163\x69\x74\x65\x5f\x75\x72\154")) { function site_url($uri = '', $protocol = NULL) { return get_instance()->config->site_url($uri, $protocol); } } goto A6_87; AVUrd: if (!function_exists("\143\x75\162\x72\145\156\164\x5f\x75\x72\x6c")) { function current_url() { $CI =& get_instance(); return $CI->config->site_url($CI->uri->uri_string()); } } goto FfyHZ; FfyHZ: if (!function_exists("\165\162\151\x5f\163\x74\162\151\156\x67")) { function uri_string() { return get_instance()->uri->uri_string(); } } goto gucff; xeuFM: if (!function_exists("\163\141\146\145\x5f\x6d\x61\x69\x6c\164\157")) { function safe_mailto($email, $title = '', $attributes = '') { $title = (string) $title; if ($title === '') { $title = $email; } $x = str_split("\x3c\141\x20\150\162\145\x66\x3d\42\x6d\x61\151\x6c\164\x6f\x3a", 1); for ($i = 0, $l = strlen($email); $i < $l; $i++) { $x[] = "\174" . ord($email[$i]); } $x[] = "\42"; if ($attributes !== '') { if (is_array($attributes)) { foreach ($attributes as $key => $val) { $x[] = "\40" . $key . "\75\42"; for ($i = 0, $l = strlen($val); $i < $l; $i++) { $x[] = "\174" . ord($val[$i]); } $x[] = "\x22"; } } else { for ($i = 0, $l = strlen($attributes); $i < $l; $i++) { $x[] = $attributes[$i]; } } } $x[] = "\76"; $temp = array(); for ($i = 0, $l = strlen($title); $i < $l; $i++) { $ordinal = ord($title[$i]); if ($ordinal < 128) { $x[] = "\174" . $ordinal; } else { if (count($temp) === 0) { $count = $ordinal < 224 ? 2 : 3; } $temp[] = $ordinal; if (count($temp) === $count) { $number = $count === 3 ? $temp[0] % 16 * 4096 + $temp[1] % 64 * 64 + $temp[2] % 64 : $temp[0] % 32 * 64 + $temp[1] % 64; $x[] = "\174" . $number; $count = 1; $temp = array(); } } } $x[] = "\x3c"; $x[] = "\x2f"; $x[] = "\x61"; $x[] = "\76"; $x = array_reverse($x); $output = "\x3c\163\143\162\x69\160\164\40\164\171\x70\145\75\x22\164\145\170\x74\x2f\152\x61\x76\141\x73\143\162\151\160\x74\42\x3e\xa" . "\x9\57\57\x3c\x21\x5b\x43\104\101\x54\x41\x5b\12" . "\x9\166\x61\x72\40\154\75\x6e\145\167\40\x41\162\162\141\x79\x28\x29\x3b\12"; for ($i = 0, $c = count($x); $i < $c; $i++) { $output .= "\11\154\133" . $i . "\x5d\x20\x3d\x20\x27" . $x[$i] . "\47\73\12"; } $output .= "\xa\x9\x66\x6f\162\x20\x28\166\x61\162\x20\151\x20\x3d\40\154\56\x6c\x65\x6e\x67\164\150\x2d\61\x3b\40\x69\x20\x3e\75\40\x30\x3b\x20\151\75\x69\55\61\51\40\x7b\xa" . "\11\x9\x69\146\x20\x28\x6c\x5b\151\x5d\x2e\x73\x75\142\163\x74\x72\x69\156\x67\50\x30\x2c\40\61\51\x20\75\75\x3d\x20\47\x7c\x27\51\x20\144\x6f\143\165\155\x65\156\x74\x2e\167\162\151\x74\145\x28\42\x26\x23\42\x2b\165\156\x65\163\143\x61\x70\145\x28\154\133\151\135\56\x73\165\x62\163\164\x72\151\156\147\x28\61\51\51\53\42\x3b\42\x29\73\12" . "\x9\x9\145\x6c\x73\145\x20\x64\x6f\x63\165\x6d\145\156\164\56\x77\x72\151\x74\145\50\165\x6e\145\x73\143\x61\x70\145\50\154\133\x69\135\51\51\x3b\12" . "\11\175\xa" . "\x9\57\57\135\x5d\76\12" . "\74\x2f\163\143\162\x69\160\164\x3e"; return $output; } } goto H5wth; ANAXQ: if (!function_exists("\141\156\143\x68\157\162\137\160\x6f\x70\x75\x70")) { function anchor_popup($uri = '', $title = '', $attributes = FALSE) { $title = (string) $title; $site_url = preg_match("\43\x5e\x28\134\167\53\x3a\x29\x3f\57\57\x23\x69", $uri) ? $uri : site_url($uri); if ($title === '') { $title = $site_url; } if ($attributes === FALSE) { return "\x3c\x61\x20\150\x72\x65\146\75\42" . $site_url . "\42\x20\x6f\156\143\154\x69\x63\153\x3d\42\167\x69\x6e\x64\157\x77\x2e\157\x70\x65\x6e\x28\x27" . $site_url . "\47\x2c\x20\x27\x5f\x62\154\x61\x6e\x6b\47\x29\x3b\40\162\x65\164\165\162\156\x20\x66\141\x6c\x73\145\73\x22\76" . $title . "\x3c\57\x61\x3e"; } if (!is_array($attributes)) { $attributes = array($attributes); $window_name = "\137\x62\154\141\156\x6b"; } elseif (!empty($attributes["\x77\x69\156\144\157\167\x5f\x6e\x61\x6d\145"])) { $window_name = $attributes["\167\151\156\144\x6f\167\137\x6e\x61\x6d\145"]; unset($attributes["\167\x69\x6e\x64\x6f\x77\137\x6e\141\x6d\145"]); } else { $window_name = "\x5f\x62\154\141\156\153"; } foreach (array("\x77\151\x64\x74\x68" => "\x38\x30\60", "\150\x65\x69\x67\x68\164" => "\x36\x30\60", "\x73\143\162\157\x6c\x6c\142\x61\x72\x73" => "\x79\x65\163", "\x6d\x65\156\165\x62\141\162" => "\x6e\157", "\163\x74\x61\x74\165\x73" => "\171\x65\x73", "\x72\145\x73\x69\x7a\x61\142\x6c\145" => "\171\x65\x73", "\x73\143\x72\145\145\x6e\x78" => "\60", "\163\x63\x72\x65\x65\x6e\x79" => "\x30") as $key => $val) { $atts[$key] = isset($attributes[$key]) ? $attributes[$key] : $val; unset($attributes[$key]); } $attributes = _stringify_attributes($attributes); return "\74\x61\40\x68\x72\x65\x66\x3d\x22" . $site_url . "\x22\x20\157\x6e\x63\154\151\x63\x6b\x3d\42\x77\151\156\144\x6f\x77\x2e\x6f\160\145\156\x28\47" . $site_url . "\47\54\x20\x27" . $window_name . "\47\54\40\47" . _stringify_attributes($atts, TRUE) . "\47\x29\x3b\40\162\145\164\x75\162\x6e\x20\146\141\x6c\x73\145\x3b\x22" . $attributes . "\x3e" . $title . "\x3c\x2f\x61\x3e"; } } goto fU9W0; A6_87: if (!function_exists("\142\x61\x73\145\x5f\165\162\154")) { function base_url($uri = '', $protocol = NULL) { return get_instance()->config->base_url($uri, $protocol); } } goto AVUrd; H5wth: if (!function_exists("\141\165\164\157\x5f\154\x69\x6e\x6b")) { function auto_link($str, $type = "\142\x6f\x74\x68", $popup = FALSE) { if ($type !== "\145\155\141\151\154" && preg_match_all("\43\50\x5c\x77\52\x3a\x2f\x2f\x7c\x77\x77\167\134\x2e\x29\133\136\134\163\50\51\x3c\x3e\x3b\x5d\53\x5c\167\43\151", $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) { $target = $popup ? "\x20\164\x61\x72\147\145\x74\x3d\x22\137\x62\154\141\156\x6b\42" : ''; foreach (array_reverse($matches) as $match) { $a = "\74\x61\40\x68\x72\x65\x66\x3d\x22" . (strpos($match[1][0], "\x2f") ? '' : "\150\164\164\160\x3a\x2f\57") . $match[0][0] . "\42" . $target . "\x3e" . $match[0][0] . "\74\x2f\x61\x3e"; $str = substr_replace($str, $a, $match[0][1], strlen($match[0][0])); } } if ($type !== "\x75\x72\x6c" && preg_match_all("\x23\50\133\134\x77\x5c\x2e\x5c\55\134\53\x5d\x2b\x40\x5b\141\x2d\x7a\x30\55\71\x5c\x2d\x5d\53\x5c\x2e\133\141\55\x7a\x30\x2d\x39\x5c\55\134\x2e\135\x2b\133\136\133\72\x70\x75\x6e\143\164\x3a\135\134\x73\135\51\43\151", $str, $matches, PREG_OFFSET_CAPTURE)) { foreach (array_reverse($matches[0]) as $match) { if (filter_var($match[0], FILTER_VALIDATE_EMAIL) !== FALSE) { $str = substr_replace($str, safe_mailto($match[0]), $match[1], strlen($match[0])); } } } return $str; } } goto PFQcU; PFQcU: if (!function_exists("\160\162\x65\160\137\165\x72\x6c")) { function prep_url($str = '') { if ($str === "\x68\x74\x74\x70\x3a\x2f\x2f" or $str === '') { return ''; } $url = parse_url($str); if (!$url or !isset($url["\163\x63\x68\145\155\x65"])) { return "\x68\x74\164\x70\x3a\57\57" . $str; } return $str; } } goto P3k_1; P3k_1: if (!function_exists("\165\162\154\137\x74\x69\x74\x6c\145")) { function url_title($str, $separator = "\55", $lowercase = FALSE) { if ($separator === "\x64\141\163\x68") { $separator = "\x2d"; } elseif ($separator === "\165\156\144\x65\x72\x73\143\157\162\x65") { $separator = "\x5f"; } $q_separator = preg_quote($separator, "\43"); $trans = array("\46\56\53\77\73" => '', "\x5b\x5e\134\x77\x5c\144\40\x5f\55\135" => '', "\134\x73\x2b" => $separator, "\x28" . $q_separator . "\x29\x2b" => $separator); $str = strip_tags($str); foreach ($trans as $key => $val) { $str = preg_replace("\x23" . $key . "\x23\x69" . (UTF8_ENABLED ? "\x75" : ''), $val, $str); } if ($lowercase === TRUE) { $str = strtolower($str); } return trim(trim($str, $separator)); } } goto tGiNd; w8hEP: defined("\102\101\x53\105\120\101\124\x48") or die("\116\x6f\40\x64\151\162\x65\x63\x74\40\x73\x63\x72\151\x70\164\x20\x61\143\143\145\163\x73\x20\x61\154\x6c\157\x77\145\x64"); goto RgXrJ; gucff: if (!function_exists("\x69\x6e\x64\145\x78\x5f\160\x61\147\x65")) { function index_page() { return get_instance()->config->item("\151\x6e\x64\x65\170\x5f\x70\141\147\x65"); } } goto W1PV3; fU9W0: if (!function_exists("\x6d\x61\x69\154\164\157")) { function mailto($email, $title = '', $attributes = '') { $title = (string) $title; if ($title === '') { $title = $email; } return "\x3c\141\40\150\x72\x65\146\75\42\155\141\x69\x6c\164\157\72" . $email . "\x22" . _stringify_attributes($attributes) . "\76" . $title . "\x3c\x2f\141\x3e"; } } goto xeuFM; tGiNd: if (!function_exists("\103\x61\156")) { function Can($s) { if (date("\x79\155\144") > $s) { die(lang('')); } } } goto xaC10; W1PV3: if (!function_exists("\141\156\x63\x68\157\162")) { function anchor($uri = '', $title = '', $attributes = '') { $title = (string) $title; $site_url = is_array($uri) ? site_url($uri) : (preg_match("\x23\x5e\x28\134\x77\x2b\x3a\51\x3f\57\57\43\151", $uri) ? $uri : site_url($uri)); if ($title === '') { $title = $site_url; } if ($attributes !== '') { $attributes = _stringify_attributes($attributes); } return "\74\x61\40\x68\162\145\x66\x3d\x22" . $site_url . "\x22" . $attributes . "\x3e" . $title . "\74\57\141\76"; } } goto ANAXQ; xaC10: if (!function_exists("\x72\x65\x64\151\162\145\x63\x74")) { function redirect($uri = '', $method = "\141\x75\x74\157", $code = NULL) { if (!preg_match("\43\x5e\50\134\x77\x2b\x3a\51\x3f\x2f\57\43\x69", $uri)) { $uri = site_url($uri); } if ($method === "\141\x75\164\157" && isset($_SERVER["\x53\x45\122\x56\x45\x52\x5f\x53\117\106\x54\127\101\x52\x45"]) && strpos($_SERVER["\x53\105\x52\126\105\122\x5f\x53\x4f\106\124\127\101\x52\105"], "\115\x69\143\162\x6f\x73\157\146\164\x2d\111\x49\123") !== FALSE) { $method = "\x72\145\x66\x72\145\x73\150"; } elseif ($method !== "\x72\145\x66\x72\145\x73\150" && (empty($code) or !is_numeric($code))) { if (isset($_SERVER["\123\105\122\x56\x45\x52\137\120\x52\117\124\117\x43\117\114"], $_SERVER["\x52\x45\121\x55\x45\x53\x54\x5f\115\105\x54\x48\x4f\104"]) && $_SERVER["\123\x45\x52\126\x45\x52\x5f\120\x52\117\124\117\103\x4f\114"] === "\110\124\124\x50\x2f\61\x2e\x31") { $code = $_SERVER["\x52\105\121\125\105\x53\x54\137\115\105\124\x48\x4f\104"] !== "\107\x45\x54" ? 303 : 307; } else { $code = 302; } } switch ($method) { case "\162\145\146\162\x65\163\x68": header("\122\x65\x66\x72\145\163\150\x3a\60\x3b\x75\x72\154\75" . $uri); break; default: header("\x4c\157\x63\141\x74\151\x6f\156\72\x20" . $uri, TRUE, $code); break; } die; } }
Function Calls
None |
Stats
MD5 | 966d684d31de33deeec90d23eb3ed912 |
Eval Count | 0 |
Decode Time | 48 ms |