SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > updraftplus > includes >


Operation   : Linux premium131.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
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/updraftplus/includes/

NameTypeSizeLast ModifiedActions
Dropbox2 Directory - -
Google Directory - -
blockui Directory - -
checkout-embed Directory - -
cloudfiles Directory - -
handlebars Directory - -
images Directory - -
jquery-ui.dialog.extended Directory - -
jquery.serializeJSON Directory - -
jstree Directory - -
labelauty Directory - -
pcloud Directory - -
select2 Directory - -
tether Directory - -
tether-shepherd Directory - -
updraftclone Directory - -
S3.php File 78483 bytes March 21 2025 22:25:22.
S3compat.php File 31581 bytes December 23 2024 23:47:28.
cacert.pem File 221470 bytes November 23 2023 19:21:20.
class-backup-history.php File 40508 bytes April 17 2025 13:45:08.
class-commands.php File 49966 bytes April 17 2025 13:45:08.
class-database-utility.php File 37569 bytes April 17 2025 13:45:08.
class-filesystem-functions.php File 41259 bytes December 23 2024 23:47:28.
class-http-error-descriptions.php File 11669 bytes August 09 2023 18:48:00.
class-job-scheduler.php File 10552 bytes May 16 2023 19:44:38.
class-manipulation-functions.php File 17139 bytes July 06 2023 16:16:56.
class-partialfileservlet.php File 7558 bytes December 23 2024 23:47:28.
class-remote-send.php File 32760 bytes March 21 2025 22:25:22.
class-search-replace.php File 20570 bytes December 23 2024 23:47:28.
class-semaphore.php File 6424 bytes August 22 2022 22:55:02.
class-storage-methods-interface.php File 18664 bytes August 09 2023 18:48:00.
class-updraft-dashboard-news.php File 8242 bytes December 23 2024 23:47:28.
class-updraft-semaphore.php File 7693 bytes August 19 2021 15:58:16.
class-updraftcentral-updraftplus-commands.php File 1857 bytes December 15 2022 01:35:40.
class-updraftplus-encryption.php File 14031 bytes April 17 2025 13:45:08.
class-wpadmin-commands.php File 39447 bytes February 26 2025 16:29:18.
class-zip.php File 18336 bytes March 21 2025 22:25:22.
ftp.class.php File 6769 bytes April 17 2025 13:45:08.
get-cpanel-quota-usage.pl File 408 bytes October 18 2013 00:20:56.
google-extensions.php File 9497 bytes December 23 2024 23:47:28.
jquery-ui.custom-v1.11.4-1-25-6.min.css File 38751 bytes May 28 2025 00:56:22.
jquery-ui.custom-v1.11.4-1-25-6.min.css.map File 58374 bytes May 28 2025 00:56:22.
jquery-ui.custom-v1.11.4.css File 43193 bytes September 16 2022 16:41:44.
jquery-ui.custom-v1.12.1-1-25-6.min.css File 40497 bytes May 28 2025 00:56:22.
jquery-ui.custom-v1.12.1-1-25-6.min.css.map File 60839 bytes May 28 2025 00:56:22.
jquery-ui.custom-v1.12.1.css File 45090 bytes September 16 2022 16:41:44.
migrator-lite.php File 53735 bytes January 11 2025 21:36:56.
updraft-admin-common-1-25-6.min.js File 158895 bytes May 28 2025 00:56:22.
updraft-admin-common.js File 263234 bytes May 28 2025 00:56:22.
updraft-restorer-skin-compatibility.php File 452 bytes February 21 2020 14:44:26.
updraft-restorer-skin.php File 1723 bytes December 15 2022 01:35:40.
updraftcentral.php File 3464 bytes April 17 2025 13:45:08.
updraftplus-clone.php File 7237 bytes March 21 2025 22:25:22.
updraftplus-login.php File 4368 bytes March 11 2019 20:05:38.
updraftplus-notices.php File 22065 bytes March 21 2025 22:25:22.
updraftplus-tour.php File 13366 bytes April 17 2025 13:45:08.
updraftvault.php File 2040 bytes December 15 2022 01:35:40.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/updraftplus/includes//ftp.class.php

<?php

if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed.');

/**
 * Adapted from http://www.solutionbot.com/2009/01/02/php-ftp-class/
 */
class UpdraftPlus_ftp_wrapper {

	private $conn_id;

	private $host;

	private $username;

	private $password;

	private $port;

	public $timeout = 60;

	public $passive = true;

	public $system_type = '';

	public $ssl = false;

	public $use_server_certs = false;

	public $disable_verify = true;

	public $login_type = 'non-encrypted';
 
	public function __construct($host, $username, $password, $port = 21) {
		$this->host     = $host;
		$this->username = $username;
		$this->password = $password;
		$this->port     = $port;
	}
 
	public function connect() {

		$time_start = time();
		$this->conn_id = ftp_connect($this->host, $this->port, 20);

		if ($this->conn_id) $result = ftp_login($this->conn_id, $this->username, $this->password);
 
		if (!empty($result)) {
			ftp_set_option($this->conn_id, FTP_TIMEOUT_SEC, $this->timeout);
			 ftp_pasv($this->conn_id, $this->passive);
			$this->system_type = ftp_systype($this->conn_id);
			return true;
		}

		if (time() - $time_start > 19) {
			global $updraftplus_admin;
			if (isset($updraftplus_admin->logged) && is_array($updraftplus_admin->logged)) {
				/* translators: %s: Connection type (e.g., FTP) */
				$updraftplus_admin->logged[] = sprintf(__('The %s connection timed out; if you entered the server correctly, then this is usually caused by a firewall blocking the connection - you should check with your web hosting company.', 'updraftplus'), 'FTP');
			} else {
				global $updraftplus;
				/* translators: %s: Connection type (e.g., FTP) */
				$updraftplus->log(sprintf(__('The %s connection timed out; if you entered the server correctly, then this is usually caused by a firewall blocking the connection - you should check with your web hosting company.', 'updraftplus'), 'FTP'), 'error');
			}
		}

		return false;
	}
 
	public function put($local_file_path, $remote_file_path, $mode = FTP_BINARY, $resume = false, $updraftplus = false) {

		$file_size = filesize($local_file_path);

		$existing_size = 0;
		if ($resume) {
			$existing_size = ftp_size($this->conn_id, $remote_file_path);
			if ($existing_size <=0) {
				$resume = false;
				$existing_size = 0;
			} else {
				if (is_a($updraftplus, 'UpdraftPlus')) $updraftplus->log("File already exists at remote site: size $existing_size. Will attempt resumption.");
				if ($existing_size >= $file_size) {
					if (is_a($updraftplus, 'UpdraftPlus')) $updraftplus->log("File is apparently already completely uploaded");
					return true;
				}
			}
		}

		// From here on, $file_size is only used for logging calculations. We want to avoid division by zero.
		$file_size = max($file_size, 1);

		if (!$fh = fopen($local_file_path, 'rb')) return false;
		if ($existing_size) fseek($fh, $existing_size);

		$ret = ftp_nb_fput($this->conn_id, $remote_file_path, $fh, $mode, $existing_size);

		// $existing_size can now be re-purposed

		while (FTP_MOREDATA == $ret) {
			if (is_a($updraftplus, 'UpdraftPlus')) {
				$new_size = ftell($fh);
				$record_after = 524288;
				if ($existing_size > 2097152) {
					$record_after = ($existing_size > 4194304) ? 2097152 : 1048576;
				}
				if ($new_size - $existing_size > $record_after) {
					$existing_size = $new_size;
					$percent = round(100*$new_size/$file_size, 1);
					$updraftplus->record_uploaded_chunk($percent, '', $local_file_path);
				}
			}
			// Continue upload
			$ret = ftp_nb_continue($this->conn_id);
		}

		fclose($fh);

		if (FTP_FINISHED != $ret) {
			if (is_a($updraftplus, 'UpdraftPlus')) $updraftplus->log("FTP upload: error ($ret)");
			return false;
		}

		return true;

	}
 
	public function get($local_file_path, $remote_file_path, $mode = FTP_BINARY, $resume = false, $updraftplus = false) {

		$file_last_size = 0;

		if ($resume) {
			if (!$fh = fopen($local_file_path, 'ab')) return false;
			clearstatcache($local_file_path);// phpcs:ignore PHPCompatibility.FunctionUse.NewFunctionParameters.clearstatcache_clear_realpath_cacheFound -- The function clearstatcache() does not have a parameter "clear_realpath_cache" in PHP version 5.2 or earlier
			$file_last_size = filesize($local_file_path);
		} else {
			if (!$fh = fopen($local_file_path, 'wb')) return false;
		}

		$ret = ftp_nb_fget($this->conn_id, $fh, $remote_file_path, $mode, $file_last_size);

		if (false == $ret) return false;

		while (FTP_MOREDATA == $ret) {

			if ($updraftplus) {
				$file_now_size = filesize($local_file_path);
				if ($file_now_size - $file_last_size > 524288) {
					$updraftplus->log("FTP fetch: file size is now: ".sprintf("%0.2f", filesize($local_file_path)/1048576)." Mb");
					$file_last_size = $file_now_size;
				}
				clearstatcache($local_file_path);// phpcs:ignore PHPCompatibility.FunctionUse.NewFunctionParameters.clearstatcache_clear_realpath_cacheFound -- The function clearstatcache() does not have a parameter "clear_realpath_cache" in PHP version 5.2 or earlier
			}

			$ret = ftp_nb_continue($this->conn_id);
		}

		fclose($fh);

		if (FTP_FINISHED == $ret) {
			if ($updraftplus) $updraftplus->log("FTP fetch: fetch complete");
			return true;
		} else {
			if ($updraftplus) $updraftplus->log("FTP fetch: fetch failed");
			return false;
		}

	}

	public function chmod($permissions, $remote_filename) {
		if ($this->is_octal($permissions)) {
			$result = ftp_chmod($this->conn_id, $permissions, $remote_filename);
			if ($result) {
				return true;
			} else {
				return false;
			}
		} else {
			throw new Exception('$permissions must be an octal number');
		}
	}
 
	public function chdir($directory) {
		ftp_chdir($this->conn_id, $directory);
	}
 
	public function delete($remote_file_path) {
		if (ftp_delete($this->conn_id, $remote_file_path)) {
			return true;
		} else {
			return false;
		}
	}
 
	public function make_dir($directory) {
		if (ftp_mkdir($this->conn_id, $directory)) {
			return true;
		} else {
			return false;
		}
	}
 
	public function rename($old_name, $new_name) {
		if (ftp_rename($this->conn_id, $old_name, $new_name)) {
			return true;
		} else {
			return false;
		}
	}
 
	public function remove_dir($directory) {
		if (ftp_rmdir($this->conn_id, $directory)) {
			return true;
		} else {
			return false;
		}
	}
 
	public function dir_list($directory) {
		return ftp_nlist($this->conn_id, $directory);
	}
 
	public function cdup() {
		ftp_cdup($this->conn_id);
	}
 
	public function size($f) {
		return ftp_size($this->conn_id, $f);
	}

	public function current_dir() {
		return ftp_pwd($this->conn_id);
	}
 
	private function is_octal($i) {
		return decoct(octdec($i)) == $i;
	}
 
	public function __destruct() {
		if ($this->conn_id) ftp_close($this->conn_id);
	}
}

SILENT KILLER Tool