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 slX5e; jycer: function yourls_get_keyword_info($keyword, $field, $notfound = f..

Decoded Output download

<?php
 goto slX5e; jycer: function yourls_get_keyword_info($keyword, $field, $notfound = false) { $pre = yourls_apply_filter("shunt_get_keyword_info", false, $keyword, $field, $notfound); if (false !== $pre) { return $pre; } $keyword = yourls_sanitize_keyword($keyword); $infos = yourls_get_keyword_infos($keyword); $return = $notfound; if (isset($infos[$field]) && $infos[$field] !== false) { $return = $infos[$field]; } return yourls_apply_filter("get_keyword_info", $return, $keyword, $field, $notfound); } goto ZnaYp; D3Fua: function yourls_get_shorturl_charset() { if (defined("YOURLS_URL_CONVERT") && in_array(YOURLS_URL_CONVERT, array(62, 64))) { $charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; } else { $charset = "0123456789abcdefghijklmnopqrstuvwxyz"; } return yourls_apply_filter("get_shorturl_charset", $charset); } goto PM_jJ; xxL3h: function yourls_insert_link_in_db($url, $keyword, $title = '') { $url = yourls_sanitize_url($url); $keyword = yourls_sanitize_keyword($keyword); $title = yourls_sanitize_title($title); $timestamp = date("Y-m-d H:i:s"); $ip = yourls_get_IP(); $table = YOURLS_DB_TABLE_URL; $binds = array("keyword" => $keyword, "url" => $url, "title" => $title, "timestamp" => $timestamp, "ip" => $ip); $insert = yourls_get_db()->fetchAffected("INSERT INTO `{$table}` (`keyword`, `url`, `title`, `timestamp`, `ip`, `clicks`) VALUES(:keyword, :url, :title, :timestamp, :ip, 0);", $binds); yourls_do_action("insert_link", (bool) $insert, $url, $keyword, $title, $timestamp, $ip); return (bool) $insert; } goto L67P5; HxH2V: function yourls_get_keyword_timestamp($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "timestamp", $notfound); } goto kA8CC; uAtMj: function yourls_keyword_is_reserved($keyword) { global $yourls_reserved_URL; $keyword = yourls_sanitize_keyword($keyword); $reserved = false; if (in_array($keyword, $yourls_reserved_URL) or yourls_is_page($keyword) or is_dir(YOURLS_ABSPATH . "/{$keyword}")) { $reserved = true; } return yourls_apply_filter("keyword_is_reserved", $reserved, $keyword); } goto KLDLJ; AW3KD: function yourls_edit_link_title($keyword, $title) { $pre = yourls_apply_filter("shunt_edit_link_title", null, $keyword, $title); if (null !== $pre) { return $pre; } $keyword = yourls_sanitize_keyword($keyword); $title = yourls_sanitize_title($title); $table = YOURLS_DB_TABLE_URL; $update = yourls_get_db()->fetchAffected("UPDATE `{$table}` SET `title` = :title WHERE `keyword` = :keyword;", array("title" => $title, "keyword" => $keyword)); return $update; } goto IiPuc; PM_jJ: function yourls_is_shorturl($shorturl) { $is_short = false; if (yourls_get_protocol($shorturl)) { $keyword = yourls_get_relative_url($shorturl); } else { $keyword = $shorturl; } if ($keyword && $keyword == yourls_sanitize_keyword($keyword) && yourls_keyword_is_taken($keyword)) { $is_short = true; } return yourls_apply_filter("is_shorturl", $is_short, $shorturl); } goto uAtMj; L67P5: function yourls_long_url_exists($url) { $pre = yourls_apply_filter("shunt_url_exists", false, $url); if (false !== $pre) { return $pre; } $table = YOURLS_DB_TABLE_URL; $url = yourls_sanitize_url($url); $url_exists = yourls_get_db()->fetchObject("SELECT * FROM `{$table}` WHERE `url` = :url", array("url" => $url)); if ($url_exists === false) { $url_exists = NULL; } return yourls_apply_filter("url_exists", $url_exists, $url); } goto gyNPi; IiPuc: function yourls_keyword_is_free($keyword) { $free = true; if (yourls_keyword_is_reserved($keyword) or yourls_keyword_is_taken($keyword, false)) { $free = false; } return yourls_apply_filter("keyword_is_free", $free, $keyword); } goto ma0Xr; ZPkZW: function yourls_get_keyword_clicks($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "clicks", $notfound); } goto qvrpQ; kA8CC: function yourls_get_keyword_stats($shorturl) { $table_url = YOURLS_DB_TABLE_URL; $shorturl = yourls_sanitize_keyword($shorturl); $res = yourls_get_db()->fetchObject("SELECT * FROM `{$table_url}` WHERE `keyword` = :keyword", array("keyword" => $shorturl)); if (!$res) { $return = array("statusCode" => 404, "message" => "Error: short URL not found"); } else { $return = array("statusCode" => 200, "message" => "success", "link" => array("shorturl" => yourls_link($res->keyword), "url" => $res->url, "title" => $res->title, "timestamp" => $res->timestamp, "ip" => $res->ip, "clicks" => $res->clicks)); } return yourls_apply_filter("get_link_stats", $return, $shorturl); } goto fLI2o; qvrpQ: function yourls_get_keyword_IP($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "ip", $notfound); } goto HxH2V; ma0Xr: function yourls_is_page($keyword) { return yourls_apply_filter("is_page", file_exists(YOURLS_PAGEDIR . "/{$keyword}.php")); } goto fxgtb; ZnaYp: function yourls_get_keyword_title($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "title", $notfound); } goto XLzEK; XLzEK: function yourls_get_keyword_longurl($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "url", $notfound); } goto ZPkZW; slX5e: function yourls_add_new_link($url, $keyword = '', $title = '', $row_id = 1) { $pre = yourls_apply_filter("shunt_add_new_link", false, $url, $keyword, $title); if (false !== $pre) { return $pre; } $return = array("status" => '', "code" => '', "message" => '', "errorCode" => '', "statusCode" => ''); $url = yourls_sanitize_url($url); if (!$url || $url == "http://" || $url == "https://") { $return["status"] = "fail"; $return["code"] = "error:nourl"; $return["message"] = yourls__("Missing or malformed URL"); $return["errorCode"] = $return["statusCode"] = "400"; return yourls_apply_filter("add_new_link_fail_nourl", $return, $url, $keyword, $title); } $ip = yourls_get_IP(); yourls_check_IP_flood($ip); if (yourls_is_shorturl($url)) { $return["status"] = "fail"; $return["code"] = "error:noloop"; $return["message"] = yourls__("URL is a short URL"); $return["errorCode"] = $return["statusCode"] = "400"; return yourls_apply_filter("add_new_link_fail_noloop", $return, $url, $keyword, $title); } yourls_do_action("pre_add_new_link", $url, $keyword, $title); if (!yourls_allow_duplicate_longurls() && ($url_exists = yourls_long_url_exists($url))) { yourls_do_action("add_new_link_already_stored", $url, $keyword, $title); $return["status"] = "fail"; $return["code"] = "error:url"; $return["url"] = array("keyword" => $url_exists->keyword, "url" => $url, "title" => $url_exists->title, "date" => $url_exists->timestamp, "ip" => $url_exists->ip, "clicks" => $url_exists->clicks); $return["message"] = yourls_s("%s already exists in database (short URL: %s)", yourls_trim_long_string($url), preg_replace("!https?://!", '', yourls_get_yourls_site()) . "/" . $url_exists->keyword); $return["title"] = $url_exists->title; $return["shorturl"] = yourls_link($url_exists->keyword); $return["errorCode"] = $return["statusCode"] = "400"; return yourls_apply_filter("add_new_link_already_stored_filter", $return, $url, $keyword, $title); } if (isset($title) && !empty($title)) { $title = yourls_sanitize_title($title); } else { $title = yourls_get_remote_title($url); } $title = yourls_apply_filter("add_new_title", $title, $url, $keyword); if ($keyword) { yourls_do_action("add_new_link_custom_keyword", $url, $keyword, $title); $keyword = yourls_sanitize_keyword($keyword, true); $keyword = yourls_apply_filter("custom_keyword", $keyword, $url, $title); if (!yourls_keyword_is_free($keyword)) { $return["status"] = "fail"; $return["code"] = "error:keyword"; $return["message"] = yourls_s("Short URL %s already exists in database or is reserved", $keyword); $return["errorCode"] = $return["statusCode"] = "400"; return yourls_apply_filter("add_new_link_keyword_exists", $return, $url, $keyword, $title); } } else { yourls_do_action("add_new_link_create_keyword", $url, $keyword, $title); $id = yourls_get_next_decimal(); do { $keyword = yourls_int2string($id); $keyword = yourls_apply_filter("random_keyword", $keyword, $url, $title); $id++; } while (!yourls_keyword_is_free($keyword)); yourls_update_next_decimal($id); } $timestamp = date("Y-m-d H:i:s"); try { if (yourls_insert_link_in_db($url, $keyword, $title)) { $return["url"] = array("keyword" => $keyword, "url" => $url, "title" => $title, "date" => $timestamp, "ip" => $ip); $return["status"] = "success"; $return["message"] = yourls_s("%s added to database", yourls_trim_long_string($url)); $return["title"] = $title; $return["html"] = yourls_table_add_row($keyword, $url, $title, $ip, 0, time(), $row_id); $return["shorturl"] = yourls_link($keyword); $return["statusCode"] = 200; } else { $return["status"] = "fail"; $return["code"] = "error:db"; $return["message"] = yourls_s("Error saving url to database"); $return["errorCode"] = $return["statusCode"] = "500"; } } catch (Exception $e) { $return["status"] = "fail"; $return["code"] = "error:concurrency"; $return["message"] = $e->getMessage(); $return["errorCode"] = $return["statusCode"] = "503"; } yourls_do_action("post_add_new_link", $url, $keyword, $title, $return); return yourls_apply_filter("add_new_link", $return, $url, $keyword, $title); } goto D3Fua; KLDLJ: function yourls_delete_link_by_keyword($keyword) { $pre = yourls_apply_filter("shunt_delete_link_by_keyword", null, $keyword); if (null !== $pre) { return $pre; } $table = YOURLS_DB_TABLE_URL; $keyword = yourls_sanitize_keyword($keyword); $delete = yourls_get_db()->fetchAffected("DELETE FROM `{$table}` WHERE `keyword` = :keyword", array("keyword" => $keyword)); yourls_do_action("delete_link", $keyword, $delete); return $delete; } goto xxL3h; V9MQt: function yourls_get_keyword_infos($keyword, $use_cache = true) { $ydb = yourls_get_db(); $keyword = yourls_sanitize_keyword($keyword); yourls_do_action("pre_get_keyword", $keyword, $use_cache); if ($ydb->has_infos($keyword) && $use_cache === true) { return yourls_apply_filter("get_keyword_infos", $ydb->get_infos($keyword), $keyword); } yourls_do_action("get_keyword_not_cached", $keyword); $table = YOURLS_DB_TABLE_URL; $infos = $ydb->fetchObject("SELECT * FROM `{$table}` WHERE `keyword` = :keyword", array("keyword" => $keyword)); if ($infos) { $infos = (array) $infos; $ydb->set_infos($keyword, $infos); } else { $infos = false; $ydb->set_infos($keyword, false); } return yourls_apply_filter("get_keyword_infos", $infos, $keyword); } goto jycer; fxgtb: function yourls_keyword_is_taken($keyword, $use_cache = true) { $pre = yourls_apply_filter("shunt_keyword_is_taken", false, $keyword); if (false !== $pre) { return $pre; } $taken = false; if (yourls_get_keyword_infos($keyword, $use_cache)) { $taken = true; } return yourls_apply_filter("keyword_is_taken", $taken, $keyword); } goto V9MQt; gyNPi: function yourls_edit_link($url, $keyword, $newkeyword = '', $title = '') { $pre = yourls_apply_filter("shunt_edit_link", null, $keyword, $url, $keyword, $newkeyword, $title); if (null !== $pre) { return $pre; } $ydb = yourls_get_db(); $table = YOURLS_DB_TABLE_URL; $url = yourls_sanitize_url($url); $keyword = yourls_sanitize_keyword($keyword); $title = yourls_sanitize_title($title); $newkeyword = yourls_sanitize_keyword($newkeyword, true); if (!$url or !$newkeyword) { $return["status"] = "fail"; $return["message"] = yourls__("Long URL or Short URL cannot be blank"); return yourls_apply_filter("edit_link", $return, $url, $keyword, $newkeyword, $title); } $old_url = $ydb->fetchValue("SELECT `url` FROM `{$table}` WHERE `keyword` = :keyword", array("keyword" => $keyword)); if ($old_url != $url && !yourls_allow_duplicate_longurls()) { $new_url_already_there = intval($ydb->fetchValue("SELECT COUNT(keyword) FROM `{$table}` WHERE `url` = :url;", array("url" => $url))); } else { $new_url_already_there = false; } if ($newkeyword != $keyword) { $keyword_is_ok = yourls_keyword_is_free($newkeyword); } else { $keyword_is_ok = true; } yourls_do_action("pre_edit_link", $url, $keyword, $newkeyword, $new_url_already_there, $keyword_is_ok); if ((!$new_url_already_there || yourls_allow_duplicate_longurls()) && $keyword_is_ok) { $sql = "UPDATE `{$table}` SET `url` = :url, `keyword` = :newkeyword, `title` = :title WHERE `keyword` = :keyword"; $binds = array("url" => $url, "newkeyword" => $newkeyword, "title" => $title, "keyword" => $keyword); $update_url = $ydb->fetchAffected($sql, $binds); if ($update_url) { $return["url"] = array("keyword" => $newkeyword, "shorturl" => yourls_link($newkeyword), "url" => yourls_esc_url($url), "display_url" => yourls_esc_html(yourls_trim_long_string($url)), "title" => yourls_esc_attr($title), "display_title" => yourls_esc_html(yourls_trim_long_string($title))); $return["status"] = "success"; $return["message"] = yourls__("Link updated in database"); } else { $return["status"] = "fail"; $return["message"] = yourls_s("Error updating %s (Short URL: %s)", yourls_esc_html(yourls_trim_long_string($url)), $keyword); } } else { $return["status"] = "fail"; $return["message"] = yourls__("URL or keyword already exists in database"); } return yourls_apply_filter("edit_link", $return, $url, $keyword, $newkeyword, $title, $new_url_already_there, $keyword_is_ok); } goto AW3KD; fLI2o: function yourls_get_longurl_keywords($longurl, $order = "ASC") { $longurl = yourls_sanitize_url($longurl); $table = YOURLS_DB_TABLE_URL; $sql = "SELECT `keyword` FROM `{$table}` WHERE `url` = :url"; if (in_array($order, array("ASC", "DESC"))) { $sql .= " ORDER BY `keyword` " . $order; } return yourls_apply_filter("get_longurl_keywords", yourls_get_db()->fetchCol($sql, array("url" => $longurl)), $longurl); } ?>

Did this file decode correctly?

Original Code

<?php
 goto slX5e; jycer: function yourls_get_keyword_info($keyword, $field, $notfound = false) { $pre = yourls_apply_filter("\163\x68\x75\156\164\x5f\147\x65\164\x5f\x6b\145\x79\167\157\162\x64\x5f\x69\156\x66\157", false, $keyword, $field, $notfound); if (false !== $pre) { return $pre; } $keyword = yourls_sanitize_keyword($keyword); $infos = yourls_get_keyword_infos($keyword); $return = $notfound; if (isset($infos[$field]) && $infos[$field] !== false) { $return = $infos[$field]; } return yourls_apply_filter("\x67\x65\x74\137\153\x65\x79\167\x6f\162\x64\137\x69\156\146\x6f", $return, $keyword, $field, $notfound); } goto ZnaYp; D3Fua: function yourls_get_shorturl_charset() { if (defined("\131\117\x55\122\x4c\123\x5f\125\122\x4c\x5f\x43\117\x4e\x56\105\x52\124") && in_array(YOURLS_URL_CONVERT, array(62, 64))) { $charset = "\60\61\62\63\x34\65\66\67\x38\71\141\x62\x63\x64\x65\x66\x67\x68\151\152\x6b\x6c\x6d\x6e\x6f\160\161\162\163\164\x75\166\167\x78\171\x7a\101\x42\103\104\x45\x46\107\x48\111\x4a\113\x4c\115\x4e\x4f\120\121\122\123\124\125\126\x57\x58\x59\x5a"; } else { $charset = "\60\x31\62\x33\x34\x35\66\x37\x38\71\141\142\143\144\145\x66\x67\x68\x69\x6a\x6b\154\155\156\157\160\161\x72\163\x74\x75\x76\x77\x78\x79\172"; } return yourls_apply_filter("\147\x65\164\x5f\163\x68\157\162\x74\165\x72\x6c\137\x63\x68\141\x72\x73\x65\x74", $charset); } goto PM_jJ; xxL3h: function yourls_insert_link_in_db($url, $keyword, $title = '') { $url = yourls_sanitize_url($url); $keyword = yourls_sanitize_keyword($keyword); $title = yourls_sanitize_title($title); $timestamp = date("\131\x2d\155\x2d\144\40\110\72\x69\x3a\x73"); $ip = yourls_get_IP(); $table = YOURLS_DB_TABLE_URL; $binds = array("\x6b\x65\x79\x77\x6f\x72\144" => $keyword, "\x75\x72\x6c" => $url, "\x74\x69\164\154\145" => $title, "\164\151\x6d\145\x73\164\141\x6d\x70" => $timestamp, "\x69\160" => $ip); $insert = yourls_get_db()->fetchAffected("\x49\x4e\x53\105\x52\x54\x20\111\x4e\x54\117\40\x60{$table}\140\x20\50\x60\153\x65\171\167\x6f\162\x64\140\54\40\140\165\162\x6c\140\54\x20\140\164\151\x74\154\x65\x60\54\40\x60\x74\x69\x6d\145\163\x74\141\x6d\160\140\x2c\40\140\151\x70\140\x2c\40\x60\143\154\151\143\153\x73\140\51\40\x56\x41\x4c\x55\x45\x53\50\72\153\145\x79\167\157\162\x64\x2c\x20\x3a\x75\162\x6c\x2c\x20\x3a\x74\151\164\x6c\x65\x2c\x20\x3a\164\151\155\145\163\x74\x61\x6d\x70\x2c\x20\72\x69\x70\54\40\60\x29\x3b", $binds); yourls_do_action("\151\156\x73\145\162\164\137\x6c\x69\x6e\x6b", (bool) $insert, $url, $keyword, $title, $timestamp, $ip); return (bool) $insert; } goto L67P5; HxH2V: function yourls_get_keyword_timestamp($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "\164\x69\155\145\163\164\141\x6d\160", $notfound); } goto kA8CC; uAtMj: function yourls_keyword_is_reserved($keyword) { global $yourls_reserved_URL; $keyword = yourls_sanitize_keyword($keyword); $reserved = false; if (in_array($keyword, $yourls_reserved_URL) or yourls_is_page($keyword) or is_dir(YOURLS_ABSPATH . "\x2f{$keyword}")) { $reserved = true; } return yourls_apply_filter("\x6b\145\x79\x77\157\162\144\x5f\151\x73\137\x72\x65\163\145\162\166\145\144", $reserved, $keyword); } goto KLDLJ; AW3KD: function yourls_edit_link_title($keyword, $title) { $pre = yourls_apply_filter("\163\150\x75\156\164\x5f\x65\144\x69\164\137\154\151\x6e\x6b\x5f\x74\151\164\154\x65", null, $keyword, $title); if (null !== $pre) { return $pre; } $keyword = yourls_sanitize_keyword($keyword); $title = yourls_sanitize_title($title); $table = YOURLS_DB_TABLE_URL; $update = yourls_get_db()->fetchAffected("\125\120\x44\101\x54\x45\40\140{$table}\x60\x20\123\105\x54\40\x60\164\151\164\x6c\x65\x60\x20\75\x20\72\164\x69\x74\x6c\145\x20\x57\x48\105\122\x45\40\140\153\145\171\167\157\162\x64\x60\x20\75\x20\72\x6b\145\x79\167\x6f\162\144\73", array("\164\151\164\154\145" => $title, "\x6b\x65\x79\167\x6f\162\x64" => $keyword)); return $update; } goto IiPuc; PM_jJ: function yourls_is_shorturl($shorturl) { $is_short = false; if (yourls_get_protocol($shorturl)) { $keyword = yourls_get_relative_url($shorturl); } else { $keyword = $shorturl; } if ($keyword && $keyword == yourls_sanitize_keyword($keyword) && yourls_keyword_is_taken($keyword)) { $is_short = true; } return yourls_apply_filter("\151\163\137\163\x68\157\162\164\x75\x72\154", $is_short, $shorturl); } goto uAtMj; L67P5: function yourls_long_url_exists($url) { $pre = yourls_apply_filter("\x73\150\x75\x6e\x74\x5f\x75\162\154\137\145\170\x69\x73\x74\x73", false, $url); if (false !== $pre) { return $pre; } $table = YOURLS_DB_TABLE_URL; $url = yourls_sanitize_url($url); $url_exists = yourls_get_db()->fetchObject("\123\x45\114\105\103\x54\x20\52\40\106\122\117\x4d\x20\140{$table}\140\40\127\110\x45\122\x45\x20\x60\x75\x72\154\x60\40\75\40\72\x75\x72\x6c", array("\165\x72\x6c" => $url)); if ($url_exists === false) { $url_exists = NULL; } return yourls_apply_filter("\x75\162\154\x5f\145\170\151\x73\x74\x73", $url_exists, $url); } goto gyNPi; IiPuc: function yourls_keyword_is_free($keyword) { $free = true; if (yourls_keyword_is_reserved($keyword) or yourls_keyword_is_taken($keyword, false)) { $free = false; } return yourls_apply_filter("\x6b\145\x79\x77\157\162\144\x5f\x69\163\137\x66\x72\145\x65", $free, $keyword); } goto ma0Xr; ZPkZW: function yourls_get_keyword_clicks($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "\x63\154\151\x63\153\x73", $notfound); } goto qvrpQ; kA8CC: function yourls_get_keyword_stats($shorturl) { $table_url = YOURLS_DB_TABLE_URL; $shorturl = yourls_sanitize_keyword($shorturl); $res = yourls_get_db()->fetchObject("\123\x45\114\x45\103\124\x20\52\40\x46\122\x4f\x4d\x20\x60{$table_url}\x60\x20\x57\x48\x45\x52\105\x20\x60\153\x65\171\x77\x6f\162\x64\140\40\x3d\x20\72\x6b\x65\171\x77\157\162\144", array("\153\145\171\167\157\162\x64" => $shorturl)); if (!$res) { $return = array("\x73\x74\x61\164\x75\x73\x43\157\144\x65" => 404, "\155\x65\163\163\x61\147\x65" => "\105\x72\x72\x6f\x72\x3a\40\163\x68\157\x72\x74\x20\125\122\114\40\x6e\157\164\40\x66\157\x75\156\x64"); } else { $return = array("\x73\164\141\164\x75\163\103\157\x64\145" => 200, "\155\x65\x73\163\141\x67\145" => "\x73\x75\x63\143\145\163\x73", "\154\x69\x6e\153" => array("\x73\x68\157\162\x74\165\162\154" => yourls_link($res->keyword), "\x75\x72\x6c" => $res->url, "\x74\x69\164\154\145" => $res->title, "\164\151\155\145\x73\x74\x61\155\x70" => $res->timestamp, "\151\160" => $res->ip, "\x63\154\x69\143\153\x73" => $res->clicks)); } return yourls_apply_filter("\x67\145\x74\x5f\x6c\x69\x6e\x6b\x5f\163\164\141\x74\x73", $return, $shorturl); } goto fLI2o; qvrpQ: function yourls_get_keyword_IP($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "\151\x70", $notfound); } goto HxH2V; ma0Xr: function yourls_is_page($keyword) { return yourls_apply_filter("\x69\x73\137\x70\141\147\x65", file_exists(YOURLS_PAGEDIR . "\57{$keyword}\56\160\150\x70")); } goto fxgtb; ZnaYp: function yourls_get_keyword_title($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "\x74\x69\164\x6c\x65", $notfound); } goto XLzEK; XLzEK: function yourls_get_keyword_longurl($keyword, $notfound = false) { return yourls_get_keyword_info($keyword, "\165\162\x6c", $notfound); } goto ZPkZW; slX5e: function yourls_add_new_link($url, $keyword = '', $title = '', $row_id = 1) { $pre = yourls_apply_filter("\163\x68\x75\x6e\164\137\141\144\144\137\x6e\x65\167\x5f\154\x69\156\x6b", false, $url, $keyword, $title); if (false !== $pre) { return $pre; } $return = array("\163\164\141\x74\x75\163" => '', "\x63\x6f\x64\x65" => '', "\x6d\x65\x73\x73\x61\147\145" => '', "\x65\162\x72\x6f\162\103\157\144\x65" => '', "\163\164\141\x74\165\x73\103\157\144\x65" => ''); $url = yourls_sanitize_url($url); if (!$url || $url == "\150\164\164\160\x3a\x2f\x2f" || $url == "\x68\x74\164\x70\x73\72\x2f\x2f") { $return["\163\x74\x61\164\x75\x73"] = "\146\x61\x69\154"; $return["\x63\x6f\144\x65"] = "\145\x72\x72\157\x72\72\x6e\157\x75\x72\154"; $return["\x6d\145\163\163\x61\x67\x65"] = yourls__("\115\x69\163\x73\151\156\147\40\157\162\x20\x6d\x61\x6c\x66\157\162\x6d\145\144\x20\x55\122\114"); $return["\x65\x72\x72\x6f\162\x43\x6f\x64\x65"] = $return["\x73\x74\x61\x74\165\163\103\157\x64\x65"] = "\x34\60\x30"; return yourls_apply_filter("\141\x64\144\137\156\x65\167\x5f\154\151\156\153\x5f\x66\141\x69\x6c\x5f\x6e\157\x75\162\154", $return, $url, $keyword, $title); } $ip = yourls_get_IP(); yourls_check_IP_flood($ip); if (yourls_is_shorturl($url)) { $return["\x73\164\x61\164\165\x73"] = "\x66\x61\151\x6c"; $return["\143\157\x64\x65"] = "\145\x72\162\x6f\162\x3a\156\x6f\x6c\157\x6f\x70"; $return["\155\x65\x73\x73\x61\x67\x65"] = yourls__("\x55\122\x4c\40\151\163\40\141\x20\163\150\x6f\162\x74\x20\x55\x52\114"); $return["\145\x72\162\x6f\162\x43\x6f\144\x65"] = $return["\163\x74\x61\164\x75\x73\103\157\144\145"] = "\64\60\60"; return yourls_apply_filter("\x61\x64\x64\x5f\156\x65\167\137\x6c\x69\x6e\x6b\x5f\146\141\151\154\137\x6e\157\x6c\157\x6f\x70", $return, $url, $keyword, $title); } yourls_do_action("\x70\162\x65\137\x61\x64\x64\137\156\145\167\137\x6c\x69\x6e\153", $url, $keyword, $title); if (!yourls_allow_duplicate_longurls() && ($url_exists = yourls_long_url_exists($url))) { yourls_do_action("\141\144\x64\x5f\156\x65\x77\x5f\154\151\156\x6b\x5f\141\154\162\x65\x61\144\171\x5f\x73\x74\157\162\x65\x64", $url, $keyword, $title); $return["\x73\164\x61\x74\165\x73"] = "\x66\141\x69\154"; $return["\x63\157\144\x65"] = "\x65\162\162\x6f\x72\x3a\165\162\154"; $return["\165\x72\x6c"] = array("\153\x65\171\167\x6f\162\144" => $url_exists->keyword, "\x75\162\154" => $url, "\164\x69\164\154\145" => $url_exists->title, "\144\x61\164\145" => $url_exists->timestamp, "\x69\x70" => $url_exists->ip, "\x63\x6c\x69\143\153\x73" => $url_exists->clicks); $return["\155\145\x73\x73\141\x67\145"] = yourls_s("\45\163\x20\141\x6c\x72\x65\x61\x64\171\x20\145\x78\151\x73\x74\163\40\x69\x6e\40\x64\x61\164\141\x62\x61\x73\145\x20\50\x73\x68\x6f\x72\164\40\125\x52\114\x3a\40\x25\163\x29", yourls_trim_long_string($url), preg_replace("\x21\150\x74\164\160\163\x3f\x3a\x2f\57\x21", '', yourls_get_yourls_site()) . "\57" . $url_exists->keyword); $return["\164\151\164\154\x65"] = $url_exists->title; $return["\x73\150\x6f\162\x74\x75\x72\x6c"] = yourls_link($url_exists->keyword); $return["\x65\162\x72\x6f\x72\x43\x6f\x64\x65"] = $return["\163\x74\x61\164\x75\163\103\157\144\145"] = "\64\60\x30"; return yourls_apply_filter("\x61\144\144\137\x6e\x65\x77\x5f\154\x69\x6e\153\137\141\x6c\x72\145\141\144\x79\137\163\x74\x6f\x72\x65\x64\137\146\x69\x6c\164\x65\162", $return, $url, $keyword, $title); } if (isset($title) && !empty($title)) { $title = yourls_sanitize_title($title); } else { $title = yourls_get_remote_title($url); } $title = yourls_apply_filter("\141\x64\144\x5f\x6e\x65\167\x5f\164\x69\x74\x6c\x65", $title, $url, $keyword); if ($keyword) { yourls_do_action("\x61\x64\x64\137\156\145\167\x5f\154\151\156\153\137\x63\x75\163\164\157\155\x5f\x6b\x65\171\167\x6f\162\144", $url, $keyword, $title); $keyword = yourls_sanitize_keyword($keyword, true); $keyword = yourls_apply_filter("\x63\165\163\x74\157\155\x5f\153\145\171\x77\x6f\162\x64", $keyword, $url, $title); if (!yourls_keyword_is_free($keyword)) { $return["\x73\x74\x61\x74\x75\163"] = "\146\x61\151\154"; $return["\143\x6f\x64\145"] = "\x65\x72\x72\157\162\72\x6b\145\171\167\157\x72\x64"; $return["\155\145\x73\x73\141\x67\x65"] = yourls_s("\123\x68\157\162\164\40\x55\122\114\40\45\x73\x20\x61\x6c\162\145\141\x64\171\40\145\x78\x69\x73\164\163\x20\x69\x6e\x20\144\x61\x74\x61\142\141\163\x65\40\x6f\162\40\x69\x73\x20\x72\x65\163\x65\162\x76\145\x64", $keyword); $return["\x65\162\162\x6f\162\103\157\x64\x65"] = $return["\163\164\x61\x74\x75\x73\103\x6f\144\145"] = "\64\x30\60"; return yourls_apply_filter("\x61\x64\x64\137\156\x65\167\137\x6c\151\x6e\153\137\x6b\145\171\x77\157\162\x64\x5f\145\x78\x69\163\164\x73", $return, $url, $keyword, $title); } } else { yourls_do_action("\x61\144\144\137\156\x65\x77\137\154\x69\x6e\x6b\137\143\162\x65\141\164\145\137\x6b\145\x79\167\x6f\162\144", $url, $keyword, $title); $id = yourls_get_next_decimal(); do { $keyword = yourls_int2string($id); $keyword = yourls_apply_filter("\162\x61\x6e\x64\157\x6d\x5f\153\145\171\x77\x6f\162\x64", $keyword, $url, $title); $id++; } while (!yourls_keyword_is_free($keyword)); yourls_update_next_decimal($id); } $timestamp = date("\x59\55\155\x2d\x64\40\110\72\151\x3a\163"); try { if (yourls_insert_link_in_db($url, $keyword, $title)) { $return["\165\162\154"] = array("\153\145\171\x77\x6f\162\x64" => $keyword, "\x75\162\x6c" => $url, "\x74\151\164\154\145" => $title, "\144\141\164\145" => $timestamp, "\x69\160" => $ip); $return["\x73\x74\141\x74\x75\x73"] = "\x73\x75\143\143\x65\x73\x73"; $return["\155\x65\x73\x73\x61\147\x65"] = yourls_s("\45\x73\40\x61\144\x64\145\144\40\164\x6f\x20\x64\x61\x74\141\142\x61\x73\145", yourls_trim_long_string($url)); $return["\x74\151\164\x6c\x65"] = $title; $return["\150\164\155\154"] = yourls_table_add_row($keyword, $url, $title, $ip, 0, time(), $row_id); $return["\163\150\157\162\164\x75\x72\x6c"] = yourls_link($keyword); $return["\x73\164\141\x74\x75\x73\x43\x6f\x64\145"] = 200; } else { $return["\163\164\141\x74\x75\163"] = "\146\141\151\154"; $return["\x63\x6f\x64\145"] = "\x65\162\x72\x6f\162\x3a\x64\142"; $return["\x6d\x65\163\x73\141\x67\x65"] = yourls_s("\105\x72\x72\157\162\x20\163\x61\x76\x69\156\x67\x20\165\162\154\40\x74\x6f\40\x64\141\x74\x61\142\x61\163\x65"); $return["\145\x72\162\157\162\103\x6f\x64\x65"] = $return["\x73\164\x61\164\x75\x73\103\157\x64\x65"] = "\65\x30\60"; } } catch (Exception $e) { $return["\x73\164\x61\x74\x75\163"] = "\x66\x61\x69\154"; $return["\x63\x6f\144\x65"] = "\145\x72\x72\157\x72\x3a\x63\x6f\x6e\143\x75\x72\162\x65\x6e\143\x79"; $return["\155\145\x73\163\x61\x67\x65"] = $e->getMessage(); $return["\x65\162\x72\157\x72\103\157\144\145"] = $return["\x73\164\141\164\165\163\103\157\x64\x65"] = "\65\x30\x33"; } yourls_do_action("\160\157\163\x74\x5f\141\144\144\137\156\145\x77\x5f\154\151\156\153", $url, $keyword, $title, $return); return yourls_apply_filter("\141\144\144\137\x6e\x65\x77\137\x6c\151\156\x6b", $return, $url, $keyword, $title); } goto D3Fua; KLDLJ: function yourls_delete_link_by_keyword($keyword) { $pre = yourls_apply_filter("\x73\150\165\x6e\x74\x5f\144\145\x6c\x65\164\145\x5f\x6c\x69\156\153\x5f\x62\171\x5f\x6b\x65\x79\167\157\x72\x64", null, $keyword); if (null !== $pre) { return $pre; } $table = YOURLS_DB_TABLE_URL; $keyword = yourls_sanitize_keyword($keyword); $delete = yourls_get_db()->fetchAffected("\x44\x45\x4c\x45\x54\105\x20\106\x52\x4f\115\40\140{$table}\140\x20\127\110\105\122\x45\40\x60\153\x65\x79\167\157\162\144\x60\40\75\x20\x3a\153\x65\x79\x77\157\162\x64", array("\x6b\145\171\x77\157\162\x64" => $keyword)); yourls_do_action("\x64\x65\154\x65\164\145\137\154\x69\x6e\x6b", $keyword, $delete); return $delete; } goto xxL3h; V9MQt: function yourls_get_keyword_infos($keyword, $use_cache = true) { $ydb = yourls_get_db(); $keyword = yourls_sanitize_keyword($keyword); yourls_do_action("\160\x72\145\137\147\x65\164\x5f\x6b\x65\x79\x77\x6f\162\x64", $keyword, $use_cache); if ($ydb->has_infos($keyword) && $use_cache === true) { return yourls_apply_filter("\147\145\164\x5f\153\145\171\x77\x6f\162\x64\137\151\156\x66\x6f\x73", $ydb->get_infos($keyword), $keyword); } yourls_do_action("\147\x65\164\137\153\x65\x79\167\157\162\x64\137\156\x6f\164\x5f\143\141\143\150\x65\x64", $keyword); $table = YOURLS_DB_TABLE_URL; $infos = $ydb->fetchObject("\123\x45\x4c\x45\x43\x54\40\52\40\x46\122\x4f\115\x20\140{$table}\x60\x20\x57\110\105\122\x45\x20\140\153\145\x79\167\x6f\162\x64\x60\x20\75\40\72\153\x65\171\167\x6f\162\144", array("\x6b\145\171\167\157\162\x64" => $keyword)); if ($infos) { $infos = (array) $infos; $ydb->set_infos($keyword, $infos); } else { $infos = false; $ydb->set_infos($keyword, false); } return yourls_apply_filter("\x67\x65\164\137\x6b\145\171\x77\157\x72\144\137\x69\156\x66\x6f\163", $infos, $keyword); } goto jycer; fxgtb: function yourls_keyword_is_taken($keyword, $use_cache = true) { $pre = yourls_apply_filter("\163\x68\x75\x6e\164\x5f\153\x65\x79\167\157\162\x64\x5f\x69\163\137\x74\141\153\145\x6e", false, $keyword); if (false !== $pre) { return $pre; } $taken = false; if (yourls_get_keyword_infos($keyword, $use_cache)) { $taken = true; } return yourls_apply_filter("\x6b\x65\171\x77\x6f\x72\144\137\x69\163\x5f\164\x61\153\145\x6e", $taken, $keyword); } goto V9MQt; gyNPi: function yourls_edit_link($url, $keyword, $newkeyword = '', $title = '') { $pre = yourls_apply_filter("\x73\x68\165\156\164\137\x65\144\151\164\x5f\x6c\151\x6e\x6b", null, $keyword, $url, $keyword, $newkeyword, $title); if (null !== $pre) { return $pre; } $ydb = yourls_get_db(); $table = YOURLS_DB_TABLE_URL; $url = yourls_sanitize_url($url); $keyword = yourls_sanitize_keyword($keyword); $title = yourls_sanitize_title($title); $newkeyword = yourls_sanitize_keyword($newkeyword, true); if (!$url or !$newkeyword) { $return["\x73\164\x61\x74\x75\x73"] = "\x66\x61\x69\154"; $return["\x6d\145\x73\x73\x61\x67\145"] = yourls__("\x4c\x6f\156\147\x20\x55\122\x4c\x20\x6f\x72\x20\x53\150\x6f\162\x74\x20\x55\x52\114\40\143\141\x6e\156\157\164\40\x62\x65\x20\x62\154\141\x6e\153"); return yourls_apply_filter("\x65\144\151\164\x5f\154\151\156\x6b", $return, $url, $keyword, $newkeyword, $title); } $old_url = $ydb->fetchValue("\123\x45\114\x45\x43\x54\40\x60\x75\x72\x6c\140\40\x46\x52\x4f\115\40\x60{$table}\x60\40\x57\110\105\122\x45\40\140\153\145\171\167\x6f\162\144\x60\40\75\40\72\x6b\145\171\167\x6f\x72\144", array("\153\x65\x79\x77\157\162\144" => $keyword)); if ($old_url != $url && !yourls_allow_duplicate_longurls()) { $new_url_already_there = intval($ydb->fetchValue("\123\105\114\x45\x43\x54\40\103\117\125\116\124\50\153\x65\171\x77\x6f\162\144\51\40\x46\122\x4f\x4d\x20\x60{$table}\x60\40\x57\x48\x45\122\x45\x20\x60\x75\x72\x6c\x60\40\75\40\x3a\x75\162\154\73", array("\x75\x72\x6c" => $url))); } else { $new_url_already_there = false; } if ($newkeyword != $keyword) { $keyword_is_ok = yourls_keyword_is_free($newkeyword); } else { $keyword_is_ok = true; } yourls_do_action("\160\x72\145\x5f\x65\x64\151\164\137\154\x69\x6e\x6b", $url, $keyword, $newkeyword, $new_url_already_there, $keyword_is_ok); if ((!$new_url_already_there || yourls_allow_duplicate_longurls()) && $keyword_is_ok) { $sql = "\125\120\104\x41\124\105\40\140{$table}\x60\x20\123\x45\x54\40\x60\165\162\154\140\x20\75\x20\x3a\165\x72\x6c\54\x20\140\153\145\171\167\x6f\162\x64\140\40\x3d\40\72\156\145\167\153\x65\171\167\157\162\144\54\40\x60\164\x69\x74\x6c\145\x60\40\x3d\x20\72\x74\151\x74\154\145\x20\x57\110\105\122\x45\x20\x60\x6b\145\x79\x77\157\162\x64\x60\x20\x3d\40\x3a\153\145\x79\x77\157\162\144"; $binds = array("\x75\x72\154" => $url, "\156\x65\167\x6b\x65\171\x77\x6f\162\144" => $newkeyword, "\x74\x69\x74\x6c\145" => $title, "\153\x65\171\167\157\162\x64" => $keyword); $update_url = $ydb->fetchAffected($sql, $binds); if ($update_url) { $return["\x75\x72\154"] = array("\x6b\x65\171\x77\157\162\144" => $newkeyword, "\163\150\157\x72\164\x75\162\154" => yourls_link($newkeyword), "\165\x72\154" => yourls_esc_url($url), "\144\151\x73\x70\154\x61\171\x5f\x75\162\154" => yourls_esc_html(yourls_trim_long_string($url)), "\164\151\x74\x6c\x65" => yourls_esc_attr($title), "\144\x69\163\x70\154\x61\x79\x5f\164\151\x74\x6c\145" => yourls_esc_html(yourls_trim_long_string($title))); $return["\163\x74\x61\164\x75\163"] = "\163\x75\143\x63\x65\163\x73"; $return["\155\x65\x73\163\x61\147\x65"] = yourls__("\x4c\151\x6e\153\40\x75\x70\x64\x61\164\145\144\40\151\156\40\x64\x61\164\x61\142\141\x73\145"); } else { $return["\163\164\x61\x74\165\x73"] = "\x66\141\x69\x6c"; $return["\155\x65\x73\163\x61\147\x65"] = yourls_s("\105\162\162\x6f\162\x20\x75\160\144\x61\x74\x69\x6e\x67\40\x25\163\x20\x28\x53\150\157\x72\x74\x20\x55\122\x4c\72\40\x25\163\51", yourls_esc_html(yourls_trim_long_string($url)), $keyword); } } else { $return["\163\x74\141\164\x75\163"] = "\x66\141\x69\154"; $return["\x6d\x65\163\x73\x61\x67\145"] = yourls__("\x55\x52\114\40\x6f\162\x20\x6b\145\171\x77\x6f\162\144\40\141\154\162\x65\141\x64\x79\40\x65\x78\151\163\x74\x73\40\151\x6e\x20\x64\141\164\x61\142\x61\163\x65"); } return yourls_apply_filter("\145\144\x69\x74\x5f\x6c\x69\156\153", $return, $url, $keyword, $newkeyword, $title, $new_url_already_there, $keyword_is_ok); } goto AW3KD; fLI2o: function yourls_get_longurl_keywords($longurl, $order = "\x41\123\103") { $longurl = yourls_sanitize_url($longurl); $table = YOURLS_DB_TABLE_URL; $sql = "\x53\x45\114\x45\x43\x54\x20\x60\x6b\x65\x79\x77\x6f\162\x64\x60\x20\106\x52\x4f\115\x20\140{$table}\x60\x20\x57\110\x45\122\105\x20\x60\165\162\154\x60\x20\x3d\x20\72\165\x72\154"; if (in_array($order, array("\101\x53\103", "\x44\105\x53\103"))) { $sql .= "\40\x4f\122\104\x45\122\40\x42\131\40\x60\153\145\x79\167\x6f\x72\144\140\x20" . $order; } return yourls_apply_filter("\x67\x65\164\137\154\157\156\147\x75\162\154\x5f\153\x65\x79\x77\157\162\x64\163", yourls_get_db()->fetchCol($sql, array("\x75\162\x6c" => $longurl)), $longurl); }

Function Calls

None

Variables

None

Stats

MD5 7135069b475431695d71e6b5a5279c32
Eval Count 0
Decode Time 108 ms