denverkurt

example-2.php

Jun 3rd, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.15 KB | None | 0 0
  1. <?php
  2. /*
  3.  Plugin Name: Wordpress Automatic Plugin
  4.  Plugin URI: http://codecanyon.net/item/wordpress-automatic-plugin/1904470?ref=ValvePress
  5.  Description: WordPress Automatic posts quality articles, Amazon products, Clickbank products, Youtube videos, eBay items, Flicker images, RSS feeds posts on auto-pilot and much more.
  6.  Version: 3.49.0
  7.  Author: ValvePress
  8.  Author URI: http://codecanyon.net/user/ValvePress/portfolio?ref=ValvePress
  9.  */
  10.  
  11. function check_dynamic_key2($str, $salt) {
  12.     $md5 = md5($str);
  13.     $md5 = md5(sha1('Y5f6hDZsF4Wmx2mB'.$md5).$salt);
  14.     return sha1(md5('ct9JFUQD6g7bFX9a'.hash('sha256', $md5.'5HizxJYiIv9ytoZ6')));
  15. }
  16.  
  17. /*  Copyright 2012-2020  Wordpress Automatic  (email : [email protected]) */
  18.  
  19. global $wpAutomaticTemp; //temp var used for displaying columns of campsigns
  20. global $wpAutomaticDemo;
  21. $wpAutomaticDemo = false;
  22.  
  23. if(stristr($_SERVER['HTTP_HOST'], 'valvepress.com')) $wpAutomaticDemo = true;
  24.  
  25.  
  26. $licenseactive=get_option('wp_automatic_license_active','');
  27. if(trim($licenseactive) != ''){
  28.    
  29.  
  30.     //fire checks
  31.     require_once  plugin_dir_path(__FILE__) . 'plugin-updates/plugin-update-checker.php';
  32.     $wp_automatic_UpdateChecker = Puc_v4_Factory::buildUpdateChecker(
  33.             'https://deandev.com/upgrades/meta/wp-automatic.json',
  34.             __FILE__,
  35.             'wp-automatic'
  36.             );
  37.    
  38.     //append keys to the download url
  39.     $wp_automatic_UpdateChecker->addResultFilter('wp_automatic_addResultFilter');
  40. // @ioncube.dk check_dynamic_key2('LxiUcc5SilPRaKCk', 'sBOScJZio593b179') -> 'a234a739fa799816b65608c44edbe8aea0dcc4d4' RANDOM
  41.     function wp_automatic_addResultFilter($info){
  42.        
  43.         $wp_automatic_license = get_option('wp_automatic_license','');
  44.        
  45.         if(isset($info->download_url)){
  46.             $info->download_url = $info->download_url . '&key='.$wp_automatic_license;
  47.         }
  48.         return $info;
  49.     }
  50. }
  51.  
  52. // amazon
  53. require_once ( dirname(__FILE__) . '/inc/amazon_api_class.php');
  54.  
  55. /*  
  56.  * Stylesheets & JS loading
  57.  */
  58.     require_once 'p_scripts.php';
  59.  
  60. /*
  61.  * Creating a Custom Post Type
  62.  */
  63.     require_once 'post_type.php';
  64.  
  65. /*
  66.  * Creating the admin menu
  67.  */
  68.     require_once 'p_menu.php';
  69.  
  70. /*
  71.  * Settings
  72.  */
  73.     require_once 'p_options.php';
  74.  
  75. /*
  76.  * Log
  77.  */
  78.     require_once 'p_log.php';
  79.    
  80.  
  81. /*
  82.  * Plugin functions
  83.  */
  84.  
  85.     require_once 'p_functions.php';
  86.    
  87.     /*
  88.      * ajax handling
  89.      */
  90.     require_once 'pajax.php';
  91.    
  92. /*
  93.  * ads adding
  94.  */
  95. require_once 'p_ads.php';
  96.  
  97. /*
  98.  * Meta Box
  99.  */
  100. require_once('p_meta.php');
  101. require_once('metabox_time.php');
  102.  
  103. /*
  104.  * Cron Schedule
  105.  */
  106. require_once 'automatic_schedule.php';
  107.  
  108. /*
  109.  * clear feed cache
  110.  */
  111.  
  112. add_filter( 'wp_feed_cache_transient_lifetime', 'wp_automatic_feed_lifetime');
  113. // @ioncube.dk check_dynamic_key2('5HHYQ7jSzRbDfvym', 'RH5L3Dn7awre2jGt') -> 'e098328fcd16ea4617e4df40fb8c8a9d663e0468' RANDOM
  114. function wp_automatic_feed_lifetime( $a  ){
  115.      return 0 ;
  116. }
  117.  
  118. if(! function_exists('do_not_cache_feeds')){
  119. // @ioncube.dk check_dynamic_key2('kDuBOGJEbQUS7pwx', 'ffktoCHljUlPw91a') -> 'ba9d5cdf31d7157200fc17537c072527c3ad550e' RANDOM
  120.     function do_not_cache_feeds(&$feed) {
  121.         $feed->enable_cache(false);
  122.     }
  123. }
  124. add_action( 'wp_feed_options', 'do_not_cache_feeds' );
  125.  
  126. /*
  127.  * Filter the content to remove first image if active
  128.  */
  129. require_once 'p_content_filter.php';
  130.  
  131. /*
  132.  * tables
  133.  */
  134. global $wpdb;
  135. $mysqlVersion = $wpdb->db_version();
  136.  
  137. if( version_compare($mysqlVersion, '5.5.3') > 0 ){
  138.     register_activation_hook( __FILE__, 'create_table_all' );
  139.     require_once 'p_tables.php';
  140. }
  141.  
  142. //removes quick edit from custom post type list
  143.  
  144. /**
  145.  * custom request for cron job
  146.  */
  147. // @ioncube.dk check_dynamic_key2('J7CZ1513bNx3uAt', '9hPpCL2GZkIIk3ie') -> '86cbd33c3c7860abbff489a82341a39925e50713' RANDOM
  148. function wp_automatic_parse_request($wp) {
  149.  
  150.     //secret word
  151.     $wp_automatic_secret = trim(get_option('wp_automatic_cron_secret'));
  152.     if(trim($wp_automatic_secret) == '') $wp_automatic_secret = 'cron';
  153.    
  154.     // only process requests with "my-plugin=ajax-handler"
  155.     if (array_key_exists('wp_automatic', $wp->query_vars)) {
  156.            
  157.         if($wp->query_vars['wp_automatic'] == $wp_automatic_secret){
  158.  
  159.             require_once(dirname(__FILE__) . '/cron.php');
  160.             exit;
  161.  
  162.         }elseif ($wp->query_vars['wp_automatic'] == 'download'){
  163.             require_once 'downloader.php';
  164.             exit;
  165.         }elseif ($wp->query_vars['wp_automatic'] == 'test'){
  166.             require_once 'test.php';
  167.             exit;
  168.         }elseif($wp->query_vars['wp_automatic'] == 'show_ip'){
  169.             $ch = curl_init();
  170.             curl_setopt($ch, CURLOPT_HEADER,0);
  171.             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  172.             curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
  173.             curl_setopt($ch, CURLOPT_TIMEOUT,20);
  174.             curl_setopt($ch, CURLOPT_REFERER, 'http://www.bing.com/');
  175.             curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8');
  176.             curl_setopt($ch, CURLOPT_MAXREDIRS, 5); // Good leeway for redirections.
  177.             curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // Many login forms redirect at least once.
  178.            
  179.             //curl get
  180.             $x='error';
  181.             $url='http://www.whatismyip.com/';
  182.            
  183.             curl_setopt($ch, CURLOPT_HTTPGET, 0);
  184.             curl_setopt($ch, CURLOPT_URL, trim($url));
  185.            
  186.             $exec=curl_exec($ch);
  187.             $x=curl_error($ch);
  188.                
  189.             echo $exec.$x;
  190.             exit;
  191.         }
  192.     }
  193. }
  194. add_action('parse_request', 'wp_automatic_parse_request');
  195.  
  196.  
  197. // @ioncube.dk check_dynamic_key2('22lJv2ZxhzPV6sEJ', 'N0HDbouuDrayytGc') -> 'b7c0a8df4edca44e3b0435acb7003980617d186d' RANDOM
  198. function wp_automatic_query_vars($vars) {
  199.     $vars[] = 'wp_automatic';
  200.     return $vars;
  201. }
  202. add_filter('query_vars', 'wp_automatic_query_vars');
  203.  
  204. /*
  205.  * support widget
  206.  */
  207.  
  208. if( ! $wpAutomaticDemo)
  209. require_once 'widget.php';
  210.  
  211.  
  212. /*
  213.  * rating notice
  214.  */
  215. require_once 'p_rating.php';
  216. require_once 'p_license.php';
  217.  
  218. /*
  219.  * update notice
  220.  */
  221. require_once 'updated.php';
  222.  
  223. /*
  224.  * admin edit
  225.  */
  226. require_once 'wp-automatic-admin-edit.php';
  227.  
  228. /*
  229.  *amazon product price update
  230.  */
  231. require_once 'wp-automatic-amazon-prices.php';
  232.  
  233. //sorting function by length
  234. // @ioncube.dk check_dynamic_key2('bKzGpMPVfHthPzi', 'witZ7hShBdbStHTp') -> '87f9e63d9d8b99a581dcc237af279316d97623c9' RANDOM
  235. function wp_automatic_sort($a,$b){
  236.     return strlen($b)-strlen($a);
  237. }
  238.  
  239. //stripslashes with array support
  240. // @ioncube.dk check_dynamic_key2('TSh1iLbJZ0RYzv0R', 'YoOVBDNYYKfRYxvF') -> '91ee7ba23528d105f640fe7e6803a7f274864c9f' RANDOM
  241. function wp_automatic_stripslashes($toStrip){
  242.     if(is_array($toStrip)){
  243.        
  244.         return array_map('wp_automatic_stripslashes',$toStrip);
  245.        
  246.     }else{
  247.         return stripslashes($toStrip);
  248.     }
  249. }
  250.  
  251. //rotate and get a single item
  252. // @ioncube.dk check_dynamic_key2('H6YTsr1PxaupX0z4', 'SefTuT1cdd9UDo') -> 'f65abf15e11ab25355da585cd0af8126ca2da231' RANDOM
  253. function wp_automatic_single_item($option_name){
  254.    
  255.     $option_value = get_option($option_name);
  256.    
  257.     //empty value
  258.     if(trim($option_value) == '') return $option_value;
  259.    
  260.     $multiple_items = array_filter( explode("\n",  $option_value ) );
  261.    
  262.      
  263.     //single value
  264.     if(count($multiple_items) == 1) return trim($multiple_items[0]);
  265.    
  266.     //multiple items, return first and send it to the last
  267.     if(count($multiple_items) > 0 ){
  268.        
  269.         $first_item = $multiple_items[0];
  270.        
  271.         unset($multiple_items[0]);
  272.        
  273.         $multiple_items[] = $first_item;
  274.        
  275.          update_option($option_name , implode("\n" ,$multiple_items ));
  276.        
  277.          return trim($first_item);
  278.        
  279.        
  280.     }
  281.    
  282.     return trim($option_value);
  283.    
  284. }
  285.  
  286. //fix relative link global
  287. // @ioncube.dk check_dynamic_key2('8bCioZIwypVqjF', '8fpObigAzQ3s3Dr4') -> '487e165d745cffb2369c61d10d40414cbfdb62b7' RANDOM
  288. function wp_automatic_fix_relative_link ($found_link,$host,$http_prefix,$the_path,$base_url = ''){
  289.    
  290.     if (! stristr ( $found_link, 'http' )) {
  291.        
  292.         if (stristr ( $found_link, '//' )) {
  293.             $found_link = $http_prefix . $found_link;
  294.         } else {
  295.            
  296.            
  297.             if( preg_match ( '{^/}' ,  $found_link ) ){
  298.                
  299.                 $found_link = $host  . $found_link;
  300.                
  301.             }else{
  302.                
  303.                 if(trim($base_url) != ''){
  304.                     $found_link = $base_url   . $found_link;
  305.                 }else{
  306.                    
  307.                     if(trim ($the_path) != ''){
  308.                         $found_link = $host . $the_path .  '/' . $found_link;
  309.                     }else{
  310.                         $found_link = $host . '/' . $found_link;
  311.                     }
  312.                    
  313.                 }
  314.             }
  315.            
  316.            
  317.            
  318.         }
  319.     }
  320.    
  321.     return $found_link;
  322.    
  323. }
Add Comment
Please, Sign In to add comment