Current File : /home/honehdyv/operationtruelovenow.com/wp-content/plugins/redirection/models/importer.php
<?php

class Red_Plugin_Importer {
	public static function get_plugins() {
		$results = array();

		$importers = array(
			'wp-simple-redirect',
			'seo-redirection',
			'safe-redirect-manager',
			'wordpress-old-slugs',
			'rank-math',
			'quick-redirects',
			'pretty-links',
		);

		foreach ( $importers as $importer ) {
			$importer = self::get_importer( $importer );
			$results[] = $importer->get_data();
		}

		return array_values( array_filter( $results ) );
	}

	public static function get_importer( $id ) {
		if ( $id === 'wp-simple-redirect' ) {
			return new Red_Simple301_Importer();
		}

		if ( $id === 'seo-redirection' ) {
			return new Red_SeoRedirection_Importer();
		}

		if ( $id === 'safe-redirect-manager' ) {
			return new Red_SafeRedirectManager_Importer();
		}

		if ( $id === 'wordpress-old-slugs' ) {
			return new Red_WordPressOldSlug_Importer();
		}

		if ( $id === 'rank-math' ) {
			return new Red_RankMath_Importer();
		}

		if ( $id === 'quick-redirects' ) {
			return new Red_QuickRedirect_Importer();
		}

		if ( $id === 'pretty-links' ) {
			return new Red_PrettyLinks_Importer();
		}

		return false;
	}

	public static function import( $plugin, $group_id ) {
		$importer = self::get_importer( $plugin );
		if ( $importer ) {
			return $importer->import_plugin( $group_id );
		}

		return 0;
	}
}

class Red_PrettyLinks_Importer extends Red_Plugin_Importer {
	public function import_plugin( $group_id ) {
		global $wpdb;

		$count = 0;
		$redirects = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}prli_links" );

		foreach ( $redirects as $redirect ) {
			$created = $this->create_for_item( $group_id, $redirect );

			if ( $created ) {
				$count++;
			}
		}

		return $count;
	}

	private function create_for_item( $group_id, $link ) {
		$item = array(
			'url'         => '/' . $link->slug,
			'action_data' => array( 'url' => $link->url ),
			'regex'       => false,
			'group_id'    => $group_id,
			'match_type'  => 'url',
			'action_type' => 'url',
			'title'       => $link->name,
			'action_code' => $link->redirect_type,
		);

		return Red_Item::create( $item );
	}

	public function get_data() {
		$data = get_option( 'prli_db_version' );

		if ( $data ) {
			global $wpdb;

			return [
				'id' => 'pretty-links',
				'name' => 'PrettyLinks',
				'total' => $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}prli_links" ),
			];
		}

		return false;
	}
}

class Red_QuickRedirect_Importer extends Red_Plugin_Importer {
	public function import_plugin( $group_id ) {
		$redirects = get_option( 'quickppr_redirects' );
		$count = 0;

		foreach ( $redirects as $source => $target ) {
			$item = $this->create_for_item( $group_id, $source, $target );

			if ( $item ) {
				$count++;
			}
		}

		return $count;
	}

	private function create_for_item( $group_id, $source, $target ) {
		$item = array(
			'url'         => $source,
			'action_data' => array( 'url' => $target ),
			'regex'       => false,
			'group_id'    => $group_id,
			'match_type'  => 'url',
			'action_type' => 'url',
			'action_code' => 301,
		);

		return Red_Item::create( $item );
	}

	public function get_data() {
		$data = get_option( 'quickppr_redirects' );

		if ( $data ) {
			return array(
				'id' => 'quick-redirects',
				'name' => 'Quick Page/Post Redirects',
				'total' => count( $data ),
			);
		}

		return false;
	}
}

class Red_RankMath_Importer extends Red_Plugin_Importer {
	public function import_plugin( $group_id ) {
		global $wpdb;

		$count = 0;
		$redirects = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}rank_math_redirections" );

		foreach ( $redirects as $redirect ) {
			$created = $this->create_for_item( $group_id, $redirect );
			$count += $created;
		}

		return $count;
	}

	private function create_for_item( $group_id, $redirect ) {
		// phpcs:ignore
		$sources = unserialize( $redirect->sources );
		$items = [];

		foreach ( $sources as $source ) {
			$url = $source['pattern'];
			if ( substr( $url, 0, 1 ) !== '/' ) {
				$url = '/' . $url;
			}

			$data = array(
				'url'         => $url,
				'action_data' => array( 'url' => str_replace( '\\\\', '\\', $redirect->url_to ) ),
				'regex'       => $source['comparison'] === 'regex' ? true : false,
				'group_id'    => $group_id,
				'match_type'  => 'url',
				'action_type' => 'url',
				'action_code' => $redirect->header_code,
			);

			$items[] = Red_Item::create( $data );
		}

		return count( $items );
	}

	public function get_data() {
		global $wpdb;

		if ( defined( 'REDIRECTION_TESTS' ) && REDIRECTION_TESTS ) {
			return 0;
		}

		if ( ! function_exists( 'is_plugin_active' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

		$total = 0;
		if ( is_plugin_active( 'seo-by-rank-math/rank-math.php' ) ) {
			$total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}rank_math_redirections" );
		}

		if ( $total ) {
			return array(
				'id' => 'rank-math',
				'name' => 'RankMath',
				'total' => intval( $total, 10 ),
			);
		}

		return 0;
	}
}

class Red_Simple301_Importer extends Red_Plugin_Importer {
	public function import_plugin( $group_id ) {
		$redirects = get_option( '301_redirects' );
		$count = 0;

		foreach ( $redirects as $source => $target ) {
			$item = $this->create_for_item( $group_id, $source, $target );

			if ( $item ) {
				$count++;
			}
		}

		return $count;
	}

	private function create_for_item( $group_id, $source, $target ) {
		$item = array(
			'url'         => str_replace( '*', '(.*?)', $source ),
			'action_data' => array( 'url' => str_replace( '*', '$1', trim( $target ) ) ),
			'regex'       => strpos( $source, '*' ) === false ? false : true,
			'group_id'    => $group_id,
			'match_type'  => 'url',
			'action_type' => 'url',
			'action_code' => 301,
		);

		return Red_Item::create( $item );
	}

	public function get_data() {
		$data = get_option( '301_redirects' );

		if ( $data ) {
			return array(
				'id' => 'wp-simple-redirect',
				'name' => 'Simple 301 Redirects',
				'total' => count( $data ),
			);
		}

		return false;
	}
}

class Red_WordPressOldSlug_Importer extends Red_Plugin_Importer {
	public function import_plugin( $group_id ) {
		global $wpdb;

		$count = 0;
		$redirects = $wpdb->get_results(
			"SELECT {$wpdb->prefix}postmeta.* FROM {$wpdb->prefix}postmeta INNER JOIN {$wpdb->prefix}posts ON {$wpdb->prefix}posts.ID={$wpdb->prefix}postmeta.post_id " .
			"WHERE {$wpdb->prefix}postmeta.meta_key = '_wp_old_slug' AND {$wpdb->prefix}postmeta.meta_value != '' AND {$wpdb->prefix}posts.post_status='publish' AND {$wpdb->prefix}posts.post_type IN ('page', 'post')"
		);

		foreach ( $redirects as $redirect ) {
			$item = $this->create_for_item( $group_id, $redirect );

			if ( $item ) {
				$count++;
			}
		}

		return $count;
	}

	private function create_for_item( $group_id, $redirect ) {
		$new = get_permalink( $redirect->post_id );
		if ( is_wp_error( $new ) ) {
			return false;
		}

		$new_path = wp_parse_url( $new, PHP_URL_PATH );
		$old = rtrim( dirname( $new_path ), '/' ) . '/' . rtrim( $redirect->meta_value, '/' ) . '/';
		$old = str_replace( '\\', '', $old );
		$old = str_replace( '//', '/', $old );

		$data = array(
			'url'         => $old,
			'action_data' => array( 'url' => $new ),
			'regex'       => false,
			'group_id'    => $group_id,
			'match_type'  => 'url',
			'action_type' => 'url',
			'action_code' => 301,
		);

		return Red_Item::create( $data );
	}

	public function get_data() {
		global $wpdb;

		$total = $wpdb->get_var(
			"SELECT COUNT(*) FROM {$wpdb->prefix}postmeta INNER JOIN {$wpdb->prefix}posts ON {$wpdb->prefix}posts.ID={$wpdb->prefix}postmeta.post_id WHERE {$wpdb->prefix}postmeta.meta_key = '_wp_old_slug' AND {$wpdb->prefix}postmeta.meta_value != '' AND {$wpdb->prefix}posts.post_status='publish' AND {$wpdb->prefix}posts.post_type IN ('page', 'post')"
		);

		if ( $total ) {
			return array(
				'id' => 'wordpress-old-slugs',
				'name' => __( 'Default WordPress "old slugs"', 'redirection' ),
				'total' => intval( $total, 10 ),
			);
		}

		return false;
	}
}

class Red_SeoRedirection_Importer extends Red_Plugin_Importer {
	public function import_plugin( $group_id ) {
		global $wpdb;

		if ( defined( 'REDIRECTION_TESTS' ) && REDIRECTION_TESTS ) {
			return 0;
		}

		$count = 0;
		$redirects = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}WP_SEO_Redirection" );

		foreach ( $redirects as $redirect ) {
			$item = $this->create_for_item( $group_id, $redirect );

			if ( $item ) {
				$count++;
			}
		}

		return $count;
	}

	private function create_for_item( $group_id, $seo ) {
		if ( intval( $seo->enabled, 10 ) === 0 ) {
			return false;
		}

		$data = array(
			'url'         => $seo->regex ? $seo->regex : $seo->redirect_from,
			'action_data' => array( 'url' => $seo->redirect_to ),
			'regex'       => $seo->regex ? true : false,
			'group_id'    => $group_id,
			'match_type'  => 'url',
			'action_type' => 'url',
			'action_code' => intval( $seo->redirect_type, 10 ),
		);

		return Red_Item::create( $data );
	}

	public function get_data() {
		global $wpdb;

		$plugins = get_option( 'active_plugins', array() );
		$found = false;

		foreach ( $plugins as $plugin ) {
			if ( strpos( $plugin, 'seo-redirection.php' ) !== false ) {
				$found = true;
				break;
			}
		}

		if ( $found ) {
			$total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}WP_SEO_Redirection" );

			return array(
				'id' => 'seo-redirection',
				'name' => 'SEO Redirection',
				'total' => $total,
			);
		}

		return false;
	}
}

class Red_SafeRedirectManager_Importer extends Red_Plugin_Importer {
	public function import_plugin( $group_id ) {
		global $wpdb;

		$count = 0;
		$redirects = $wpdb->get_results(
			"SELECT {$wpdb->prefix}postmeta.* FROM {$wpdb->prefix}postmeta INNER JOIN {$wpdb->prefix}posts ON {$wpdb->prefix}posts.ID={$wpdb->prefix}postmeta.post_id WHERE {$wpdb->prefix}postmeta.meta_key LIKE '_redirect_rule_%' AND {$wpdb->prefix}posts.post_status='publish'"
		);

		// Group them by post ID
		$by_post = array();
		foreach ( $redirects as $redirect ) {
			if ( ! isset( $by_post[ $redirect->post_id ] ) ) {
				$by_post[ $redirect->post_id ] = array();
			}

			$by_post[ $redirect->post_id ][ str_replace( '_redirect_rule_', '', $redirect->meta_key ) ] = $redirect->meta_value;
		}

		// Now go through the redirects
		foreach ( $by_post as $post ) {
			$item = $this->create_for_item( $group_id, $post );

			if ( $item ) {
				$count++;
			}
		}

		return $count;
	}

	private function create_for_item( $group_id, $post ) {
		$regex = false;
		$source = $post['from'];

		if ( strpos( $post['from'], '*' ) !== false ) {
			$regex = true;
			$source = str_replace( '*', '.*', $source );
		} elseif ( isset( $post['from_regex'] ) && $post['from_regex'] === '1' ) {
			$regex = true;
		}

		$data = array(
			'url'         => $source,
			'action_data' => array( 'url' => $post['to'] ),
			'regex'       => $regex,
			'group_id'    => $group_id,
			'match_type'  => 'url',
			'action_type' => 'url',
			'action_code' => intval( $post['status_code'], 10 ),
		);

		return Red_Item::create( $data );
	}

	public function get_data() {
		global $wpdb;

		$total = $wpdb->get_var(
			"SELECT COUNT(*) FROM {$wpdb->prefix}postmeta INNER JOIN {$wpdb->prefix}posts ON {$wpdb->prefix}posts.ID={$wpdb->prefix}postmeta.post_id WHERE {$wpdb->prefix}postmeta.meta_key = '_redirect_rule_from' AND {$wpdb->prefix}posts.post_status='publish'"
		);

		if ( $total ) {
			return array(
				'id' => 'safe-redirect-manager',
				'name' => 'Safe Redirect Manager',
				'total' => intval( $total, 10 ),
			);
		}

		return false;
	}
}
w3.readbtooom.com - WSO YANZ ENC BYPASS
Attention:
Uname:
Php:
Hdd:
Cwd:
Yanz Webshell! - PRIV8 WEB SHELL ORB YANZ BYPASS! V2.0
Linux business77.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
8.2.28 Safe mode: OFF Datetime: 2025-06-20 09:20:46
4216.32 GB Free: 1553.47 GB (36%)
/home/honehdyv/readbtooom.com/ dr-xr-xr-x [ root ] [ home ] Text

Server IP:
162.0.232.195
Client IP:
216.73.216.50
YanzWSO
[ Files ][ Masfix ][ Symlink403 ][ Symlink404 ][ Vhost ][ WpAutoedit ][ ReadDomains ][ KillProccess ][ TerminalV2 ][ Adminer ][ WpDownloader ]

File manager

NameSizeModifyPermissionsActions
[ . ]dir2025-06-20 06:08:40dr-xr-xr-xRename Touch
[ .. ]dir2025-06-13 22:47:43dr-xr-xr-xRename Touch
[ .well-known ]dir2025-06-10 00:36:31drwxr-xr-xRename Touch
[ 51534 ]dir2025-06-16 00:18:17dr-xr-xr-xRename Touch
[ 522314 ]dir2025-06-17 12:04:08drwxr-xr-xRename Touch
[ 7e716 ]dir2025-06-16 03:04:15dr-xr-xr-xRename Touch
[ 862944 ]dir2025-06-18 20:47:46drwxr-xr-xRename Touch
[ 9898c ]dir2025-06-18 00:18:26dr-xr-xr-xRename Touch
[ bf1a1 ]dir2025-06-18 05:42:08dr-xr-xr-xRename Touch
[ cgi-bin ]dir2025-06-10 09:47:12drwxr-xr-xRename Touch
[ f5462e ]dir2025-06-13 02:01:09drwxr-xr-xRename Touch
[ images ]dir2025-06-13 00:25:32drwxr-xr-xRename Touch
[ real ]dir2025-06-19 09:26:46drwxr-xr-xRename Touch
[ wp-admin ]dir2025-06-19 20:30:38drwxr-xr-xRename Touch
[ wp-content ]dir2025-06-20 05:55:18drwxr-xr-xRename Touch
[ wp-includes ]dir2025-06-20 08:01:37drwxr-xr-xRename Touch
.hcflag31 B2025-06-17 22:30:17-rw-r--r--Rename Touch Edit Download
.htaccess717 B2025-06-20 06:00:01-r-xr-xr-xRename Touch Edit Download
bk1.php6.75 KB2025-06-19 08:21:31-rw-r--r--Rename Touch Edit Download
Crackers_Alpha_v1 (2).php3.57 KB2025-06-19 08:50:24-rw-r--r--Rename Touch Edit Download
error_log296.34 MB2025-06-20 09:20:46-rw-r--r--Rename Touch Edit Download
index.php22.08 KB2025-06-20 09:20:46-rw-r--r--Rename Touch Edit Download
index.php022.08 KB2023-04-08 20:30:31-rwxr-xr-xRename Touch Edit Download
license.txt19.45 KB2023-11-12 01:31:37-rw-r--r--Rename Touch Edit Download
MuPlugin.php1.24 KB2025-06-20 06:31:32-rw-r--r--Rename Touch Edit Download
pages.php1.46 KB2023-06-03 10:14:15-r--r--r--Rename Touch Edit Download
ps.php77.60 KB2025-06-20 06:08:28-rw-r--r--Rename Touch Edit Download
ps.php877.60 KB2025-06-20 06:08:30-rw-r--r--Rename Touch Edit Download
ps.phtml77.60 KB2025-06-20 06:08:33-rw-r--r--Rename Touch Edit Download
psm.php1.19 KB2025-06-20 06:08:35-rw-r--r--Rename Touch Edit Download
psm.php71.19 KB2025-06-20 06:08:37-rw-r--r--Rename Touch Edit Download
psm.php81.19 KB2025-06-20 06:08:39-rw-r--r--Rename Touch Edit Download
psm.phtml1.19 KB2025-06-20 06:08:40-rw-r--r--Rename Touch Edit Download
radio.php5.62 KB2025-06-19 10:49:13-rw-r--r--Rename Touch Edit Download
readme.html7.23 KB2024-06-25 03:04:45-rw-r--r--Rename Touch Edit Download
readme.txt101 B2025-06-20 06:08:44-rw-r--r--Rename Touch Edit Download
robots.txt391 B2022-12-29 20:30:38-r--r--r--Rename Touch Edit Download
search.php1.50 KB2024-01-14 20:30:38-r--r--r--Rename Touch Edit Download
userfuns.php46 B2025-06-19 16:31:01-rw-r--r--Rename Touch Edit Download
wp-blog-header.php478 B2025-06-10 00:28:11-r--r--r--Rename Touch Edit Download
wp-comments-post.php2.27 KB2023-11-03 18:48:36-rw-r--r--Rename Touch Edit Download
wp-config-sample.php446 B2025-06-16 22:54:19-rw-r--r--Rename Touch Edit Download
wp-config.php3.05 KB2025-06-18 20:46:02-rw-r--r--Rename Touch Edit Download
wp-cron.php5.51 KB2023-11-03 18:48:37-rw-r--r--Rename Touch Edit Download
wp-links-opml.php2.44 KB2023-11-03 18:48:36-rw-r--r--Rename Touch Edit Download
wp-load.php3.96 KB2025-06-10 00:28:11-r--r--r--Rename Touch Edit Download
wp-mail.php8.33 KB2023-11-12 01:31:37-rw-r--r--Rename Touch Edit Download
wp-settings.php25.79 KB2025-06-17 22:29:45-rw-r--r--Rename Touch Edit Download
wp-trackback.php4.77 KB2023-11-03 18:48:36-rw-r--r--Rename Touch Edit Download
xmlrpc.php3.08 KB2023-11-12 01:31:37-rw-r--r--Rename Touch Edit Download
 
Change dir:
Read file:
Make dir: (Not writable)
Make file: (Not writable)
Terminal:
Upload file: (Not writable)

>