Is this code in a free WP theme normal or is it some sneaky stuff?

Status
Not open for further replies.

Edwin

New member
Mar 17, 2007
329
3
0
Okay, when making some changes to the appearance of a theme i noticed some odd coding, something that i haven't seen before.

Code:
<?php eval(str_rot13('shapgvba purpx_shapgvbaf(){vs(!svyr_rkvfgf(qveanzr(__SVYR__)."/shapgvbaf.cuc")){rpub(\'Guvf gurzr vf eryrnfrq haqre perngvir pbzzbaf yvprapr, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\');qvr;}}purpx_shapgvbaf();'));  wp_head(); ?>
That isn't normal code right?

I'm pretty much coding dyslectic so i wouldn't know if this is something i should be worried about.
I don't want to have a bunch of viagra shit or something linking out from the blog.
 


Code:
function check_functions(){if(!file_exists(dirname(__FILE__)."/functions.php")){echo('This theme is released under creative commons licence, all links in the footer should remain intact');die;}}check_functions();

Basically checking to make sure the functions.php file shipped with the theme is still there. My next question would be what's in that file, but so far it's only sneaky because they're using a rot_13 and eval to make sure you're not removing links from the theme.
 
Below is what is stored in the functions.php file.

Code:
<?php
eval(str_rot13('shapgvba purpx_sbbgre(){$y=\'<n uers="uggc://jjj.fxvacerff.pbz/">Jbeqcerff gurzrf</n> znqr serr ol <n uers="uggc://jjj.bzavf.pbz/">Jro Ubfgvat</n>, <n uers="uggc://jjj.jroubfgvatcnq.pbz/">Jro Fvgr Ubfgvat</n> naq <n uers="uggc://jjj.engrzlubfg.pbz/">Purnc jro ubfgvat</n>\';$s=qveanzr(__SVYR__).\'/sbbgre.cuc\';$sq=sbcra($s,\'e\');$p=sernq($sq,svyrfvmr($s));spybfr($sq);vs(fgecbf($p,$y)==0){rpub \'Guvf gurzr vf eryrnfrq haqre perngvir pbzzbaf yvprapr, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\';qvr;}}purpx_sbbgre();'));

?><?php
if ( function_exists('register_sidebar') )
{
    register_sidebar(array(
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="widgettitle">',
        'after_title' => '</h2>',
    ));
    register_sidebar(array(
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="widgettitle">',
        'after_title' => '</h2>',
    ));    
}

function get_sidebar_right() {
    do_action( 'get_sidebar' );
    if ( file_exists( TEMPLATEPATH . '/sidebar_right.php') )
        load_template( TEMPLATEPATH . '/sidebar_right.php');
    else
        load_template( ABSPATH . 'wp-content/themes/default/sidebar.php');
}

eval(str_rot13('shapgvba purpx_urnqre(){vs(!(shapgvba_rkvfgf("purpx_shapgvbaf")&&shapgvba_rkvfgf("purpx_s_sbbgre"))){rpub(\'Guvf gurzr vf eryrnfrq haqre perngvir pbzzbaf yvprapr, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\');qvr;}}'));

function wp_list_pages2($limit=NULL) {

    check_header();
    
    $defaults = array('depth' => 0, 'show_date' => '', 'date_format' => get_option('date_format'),
        'child_of' => 0, 'exclude' => '', 'title_li' =>'', 'echo' => 1, 'authors' => '', 'sort_column' => 'menu_order, post_title');
    $r = array_merge((array)$defaults, (array)$r);

    $output = '';
    $current_page = 0;

    // sanitize, mostly to keep spaces out
    $r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']);

    // Allow plugins to filter an array of excluded pages
    $r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude'])));

    // Query pages.
    $pages = get_pages($r);

    if ( !empty($pages) ) {

        for($i=0;$i<count($pages);$i++)
        {
            $output .='<a href="'.get_page_link($pages[$i]->ID).'">'.$pages[$i]->post_title.'</a>';
            if($limit!=NULL)
            {
                break;
            }
        }
    }

    $output = apply_filters('wp_list_pages', $output);

    echo $output;
}

?>

I do actually want to remove the links in the footer.
 
my vote would be: remove the functions.inc. and also remove that crappy rot13 stuff.

IMHO if it's rot13'd like that they're trying to be sneaky. But it's pointless, as someone will just remove it anyway if they want. Like you're asking about :)
 
Status
Not open for further replies.