Title: Help for eval code find in wordpress theme.
Last modified: August 19, 2016

---

# Help for eval code find in wordpress theme.

 *  [opss](https://wordpress.org/support/users/opss/)
 * (@opss)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/help-for-eval-code-find-in-wordpress-theme/)
 * I found some codes in header.php and functions.ph that I have decrypted in this
   page:
 * [http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/](http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/)
 * Whether http:// links have changed the theme does non start.
 * I decrypted copyng only the content between <?php eval(base64_decode(‘ and ‘));?
   > of each code.
 * Can you help me to remove links from these codes and ensure that the theme not
   have problems?
 * Thanks!
 * Codes in header.php decrypted:
 * `function theme_footer_t() { if (!(function_exists("check_theme_footer") && function_exists("
   check_theme_header"))) { theme_usage_message(); die; } } theme_footer_t();`
 *     ```
       function functions_file_exists() { if (!file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") ) { echo ("<p style=\"padding:10px; margin: 10px; text-align:center; border: 2px dashed Red; font-family:arial; font-weight:bold; background: #fff; color: #000;\">This theme is released free for use under creative commons licence. All links in the footer should remain intact. These links are all family friendly and will not hurt your site in any way. This great theme is brought to you for free by these supporters.</p>"); die; } } functions_file_exists();
       ```
   
 * Codes in functions.php decrypted:
 *     ```
       if (!empty($_REQUEST["theme_license"])) { theme_usage_message(); exit(); } function theme_usage_message() { if (empty($_REQUEST["theme_license"])) { $theme_license_false = get_bloginfo("url") . "/index.php?theme_license=true"; echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_license_false\">"; exit(); } else { echo ("<p style=\"padding:10px; margin: 10px; text-align:center; border: 2px dashed Red; font-family:arial; font-weight:bold; background: #fff; color: #000;\">This theme is released free for use under creative commons licence. All links in the footer should remain intact. These links are all family friendly and will not hurt your site in any way. This great theme is brought to you for free by these supporters.</p>"); } }
       ```
   
 *     ```
       function check_theme_footer() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = '<a href="http://www.bestincellphones.com/">T-Mobile Phones for Sale at BestInCellPhones.com</a> | Thanks to <a href="http://www.icellphonedeals.com/">Free Phones at iCellPhoneDeals.com</a>, <a href="http://mmohut.com">Free MMORPG Games</a> and <a href="http://fatburningrules.com/fat-burning-furnace-review">Fat burning furnace review</a>'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); fclose($fd); if (strpos($c, $l) == 0) { theme_usage_message(); die; } } } check_theme_footer();
       ```
   
 *     ```
       check_theme_header();
   
       original:if(!function_exists('get_sidebars')) {
       	function get_sidebars($args='')
       	{
       		eval(base64_decode('Y2hlY2tfdGhlbWVfaGVhZGVyKCk7'));
       		 get_sidebar($args);
       	}
       }
       ```
   
 *     ```
       function check_theme_header() { if (!(function_exists("functions_file_exists") && function_exists("theme_footer_t"))) { theme_usage_message(); die; } }  
   
       original:
       <?php
       }
       mytheme_admin_init();
       eval(base64_decode('ZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgeyBpZiAoIShmdW5jdGlvbl9leGlzdHMoImZ1bmN0aW9uc19maWxlX2V4aXN0cyIpICYmIGZ1bmN0aW9uX2V4aXN0cygidGhlbWVfZm9vdGVyX3QiKSkpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBkaWU7IH0gfQ=='));
       add_action('admin_menu', 'mytheme_add_admin')
       ```
   

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/help-for-eval-code-find-in-wordpress-theme/#post-1491413)
 * The code references a theme license. To remove it would be a breach of copyright.

Viewing 1 replies (of 1 total)

The topic ‘Help for eval code find in wordpress theme.’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/help-for-eval-code-find-in-wordpress-theme/#post-1491413)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
