1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please crack this base64 decode

Discussion in 'PHP & Perl' started by kobra, Aug 3, 2010.

  1. kobra

    kobra Registered Member

    Joined:
    Dec 9, 2007
    Messages:
    78
    Likes Received:
    314
    This is a wordpress theme's functions.php file. This script has frozen my entire site when I added "target=blank" to their crappy footer links. I want to take revenge now. Want to remove all those footer links. So could you please decode this encoded php file. I tried some online decode tools but now working.


    Code:
    <?php
    
    //regster single sidebar
    if (function_exists('register_sidebar'))
    register_sidebar();
    eval(base64_decode('aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2xpY2Vuc2UiXSkpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7IH0gZnVuY3Rpb24gdGhlbWVfdXNhZ2VfbWVzc2FnZSgpIHsgaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfbGljZW5zZSJdKSkgeyAkdGhlbWVfbGljZW5zZV9mYWxzZSA9IGdldF9ibG9naW5mbygidXJsIikgLiAiL2luZGV4LnBocD90aGVtZV9saWNlbnNlPXRydWUiOyBlY2hvICI8bWV0YSBodHRwLWVxdWl2PVwicmVmcmVzaFwiIGNvbnRlbnQ9XCIwO3VybD0kdGhlbWVfbGljZW5zZV9mYWxzZVwiPiI7IGV4aXQoKTsgfSBlbHNlIHsgZWNobyAoIjxwIHN0eWxlPVwiZm9udC13ZWlnaHQ6Ym9sZDsgYmFja2dyb3VuZDogI2ZmZjsgY29sb3I6ICN******A7XCI+VGhpcyB0aGVtZSBpcyBsaWNlbnNlZCB1bmRlciBDQzMuMCwgeW91IGFyZSBub3QgYWxsb3dlZCB0byBtb2RpZnkvcmVtb3ZlIG91ciBsaW5rIHdpdGhvdXQgcGVybWlzc2lvbi4gPGJyIC8+VGhhbmsgeW91IGZvciBzdXBwb3J0aW5nIHVzIG1ha2luZyBtb3JlIEZSRUUgY3JlYXRpdmUgdGhlbWVzLjwvcD48cD4qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKjwvcD48cD5JZiB5b3Ugc2VlIGEgd2FybmluZyBtZXNzYWdlIGxpa2UgdGhpcywgeW91IGNhbiBiZSBhYmxlIHRvIGZpeCB0aGUgcHJvYmxlbSBieSB0aGUgZm9sbG93aW5nIHN0ZXBzOjwvcD4xLiBEb3dubG9hZCBhIGZyZXNoIGNvcHkgb2YgdGhlbWUgZmlsZTxiciAvPjIuIFRoZW4gdW56aXAgdGhlIHBhY2thZ2UgZmlsZTxiciAvPjMuIFJlcGxhY2UgeW91ciBzZXJ2ZXIgJ2Zvb3Rlci5waHAnLCAnc2lkZWJhci5waHAnIGFuZCAnZnVuY3Rpb25zLnBocCcgZmlsZSB3aXRoIG91ciBvcmlnaW5hbCAnZm9vdGVyLnBocCcsICdzaWRlYmFyLnBocCcgYW5kICdmdW5jdGlvbnMucGhwJyB0byB0aGUgd29yZHByZXNzIHRoZW1lIGZvbGRlcjxwPkhvcGUgdGhpcyBoZWxwcy48L3A+Iik7IH0gfQ=='));
    //remove html tag when saving comments
    function preprocess_comment_striptags($commentdata) {
        $commentdata['comment_content'] = strip_tags($commentdata['comment_content']);
        return $commentdata;
    }
    add_filter('preprocess_comment', 'preprocess_comment_striptags');
    eval(base64_decode('ZnVuY3Rpb24gY2hlY2tfdGhlbWVfZm9vdGVyKCkgeyAkbCA9ICdQcmVzZW50ZWQgYnkgPGEgaHJlZj0iaHR0cDovL3d3dy5sdWdnYWdlZ3VpZGVzLmNvbS8iPjE3IGxhcHRvcCBiYWNrcGFjazwvYT4sIDxhIGhyZWY9Imh0dHA6Ly93d3cubHVnZ2FnZWd1aWRlcy5jb20vY2F0ZWdvcmllcy9hbWVyaWNhbi10b3VyaXN0ZXIvIj5BbWVyaWNhbiBUb3VyaXN0ZXI8L2E+LCBDb2RlZDogRVp3cHRoZW1lcy4nOyAkZiA9IGRpcm5hbWUoX19maWxlX18pIC4gIi9mb290ZXIucGhwIjsgJGZkID0gZm9wZW4oJGYsICJyIik7ICRjID0gZnJlYWQoJGZkLCBmaWxlc2l6ZSgkZikpOyBmY2xvc2UoJGZkKTsgaWYgKHN0cnBvcygkYywgJGwpID09IDApIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBkaWU7IH0gfSBjaGVja190aGVtZV9mb290ZXIoKTs='));
    // remove html tag when showing comments
    function comment_text_striptags($string) {
        return strip_tags($string);
    }
    add_filter('comment_text', 'comment_text_striptags');
    eval(base64_decode('ZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgeyBpZiAoIShmdW5jdGlvbl9leGlzdHMoImdldF9oZWFkcyIpICYmIGZ1bmN0aW9uX2V4aXN0cygid3BfaGVhZGVycyIpKSkgeyB0aGVtZV91c2FnZV9tZXNzYWdlKCk7IGRpZTsgfSB9'));
    // posts navigation
    function goto_previous_post($format='« %link', $link='Previous Post', $in_same_cat = false, $excluded_categories = '') {
    	adjacent_post_link($format, $link, $in_same_cat, $excluded_categories, true);
    }
    
    function goto_next_post($format='%link »', $link='Next Post', $in_same_cat = false, $excluded_categories = '') {
    	adjacent_post_link($format, $link, $in_same_cat, $excluded_categories, false);
    }
    eval(base64_decode('ZnVuY3Rpb24gd3BfaGVhZGVycygpIHsgaWYgKCEoZnVuY3Rpb25fZXhpc3RzKCJjaGVja190aGVtZV9mb290ZXIiKSAmJiBmdW5jdGlvbl9leGlzdHMoImNoZWNrX3RoZW1lX2hlYWRlciIpKSkgeyB0aGVtZV91c2FnZV9tZXNzYWdlKCk7IGRpZTsgfSB9'));
    function get_recent_comments($args) {
    	global $wpdb, $comments, $comment;
    	extract($args, EXTR_SKIP);
    	$options = get_option('widget_recent_comments');
    	$title = empty($options['title']) ? __('<h2>Recent Comments</h2>') : apply_filters('widget_title', $options['title']);
    	if ( !$number = (int) $options['number'] )
    		$number = 5;
    	else if ( $number < 1 )
    		$number = 1;
    	else if ( $number > 15 )
    		$number = 15;
    
    	if ( !$comments = wp_cache_get( 'recent_comments', 'widget' ) ) {
    		$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT $number");
    		wp_cache_add( 'recent_comments', $comments, 'widget' );
    	}
    
    		 echo $before_widget;
    			echo $before_title . $title . $after_title;
    			echo '<ul id="recentcomments">';
    			if ( $comments ) : foreach ( (array) $comments as $comment) :
    			echo  '<li class="recentcomments">' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_comment_link($comment->comment_ID) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
    			endforeach; endif;
    		echo '</ul>';
    		echo $after_widget; 
    
    }
    eval(base64_decode('ZnVuY3Rpb24gZ2V0X2hlYWRzKCkgeyBpZiAoIWZpbGVfZXhpc3RzKGRpcm5hbWUoX19maWxlX18pIC4gIi9mdW5jdGlvbnMucGhwIikgfHwgIWZ1bmN0aW9uX2V4aXN0cygidGhlbWVfdXNhZ2VfbWVzc2FnZSIpICkgeyBlY2hvICgiVGhpcyB0aGVtZSBpcyBsaWNlbnNlZCB1bmRlciBDQzMuMCwgeW91IGFyZSBub3QgYWxsb3dlZCB0byBtb2RpZnkvcmVtb3ZlIG91ciBsaW5rIHdpdGhvdXQgcGVybWlzc2lvbi4gPGJyIC8+VGhhbmsgeW91IGZvciBzdXBwb3J0aW5nIHVzIG1ha2luZyBtb3JlIEZSRUUgY3JlYXRpdmUgdGhlbWVzLiIpOyBkaWU7IH0gfQ=='));
    function get_recent_links($args) {
    	extract($args, EXTR_SKIP);
    
    	$before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget);
    	wp_list_bookmarks(apply_filters('widget_links_args', array(
    		'title_before' => '<span style="display: none;">', 'title_after' => '</span>',
    		'category_before' => $before_widget, 'category_after' => $after_widget,
    		'show_images' => true, 'class' => 'linkcat widget'
    	)));
    }
    if(!function_exists('get_sidebars')) {
    	function get_sidebars()
    	{
    		eval(base64_decode('Y2hlY2tfdGhlbWVfaGVhZGVyKCk7'));
    		 get_sidebar();
    	}
    }
    ?>
     
  2. özdemir

    özdemir Newbie

    Joined:
    May 19, 2010
    Messages:
    9
    Likes Received:
    0
    I have de code d it but i cant post it here.
     
  3. Donnie Darko

    Donnie Darko Regular Member

    Joined:
    Aug 22, 2007
    Messages:
    229
    Likes Received:
    356
    Location:
    USA
    Why can't you use a decoder that's available for free online?
     
  4. risefromdeath

    risefromdeath Power Member

    Joined:
    Jul 1, 2009
    Messages:
    650
    Likes Received:
    107
    replace eval by echo..that should get you what you want
     
  5. bryanon

    bryanon Executive VIP Premium Member

    Joined:
    Oct 16, 2009
    Messages:
    1,395
    Likes Received:
    1,479