403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.217.143
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/tgnew/wp-content/plugins/password-protected/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/tgnew/wp-content/plugins/password-protected/includes/transient-functions.php
<?php
/**
 * Transient functions.
 *
 * @usage Transient functions to get, set and delete transient values
 * @description Use transient instead of cookies.
 * @package Password Protected
 */

defined( 'ABSPATH' ) || exit;

if ( ! function_exists( 'pp_get_transient_identifier' ) ) {
	/**
	 * Get identifier
	 *
	 * @param string $key transient key.
	 *
	 * @usage function to get unique transient key
	 * @return string: transient key
	 */
	function pp_get_transient_identifier( $key = '' ) {
		return $key . '_' . pp_get_ip_address();
	}
}

if ( ! function_exists( 'pp_get_ip_address' ) ) {
	/**
	 * Get IP Address
	 *
	 * @usage function to get ip of current user
	 * @return string: ip
	 */
	function pp_get_ip_address() {
		foreach ( array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR' ) as $key ) {
			if ( array_key_exists( $key, $_SERVER ) === true ) {
				foreach ( explode(',', $_SERVER[ $key ] ) as $ip ) {
					$ip = trim( $ip );

					if ( filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) !== false ){
						return $ip;
					}
				}
			}
		}
	}
}

if ( ! function_exists( 'pp_get_transient' ) ) {
	/**
	 * Get Transient
	 *
	 * @usage function to get transient value by key
	 *
	 * @param string $key transient key.
	 *
	 * @return bool|mixed
	 */
	function pp_get_transient( $key = '' ) {
		$transient = pp_get_transient_identifier( $key );
		$value = get_transient( $transient );
		if ( ! empty( $value ) ) {
			return $value;
		} else {
			return false;
		}
	}
}

if ( ! function_exists( 'pp_set_transient' ) ) {
	/**
	 * Set Transient
	 *
	 * @param string $key transient key.
	 * @param string $value transient value.
	 * @param int    $duration transient duration.
	 *
	 * @usage function to set transient value by key, value and duration
	 */
	function pp_set_transient( $key = '', $value = '', $duration = HOUR_IN_SECONDS ) {
		$transient = pp_get_transient_identifier( $key );
		set_transient( $transient, $value, $duration );
	}
}

if ( ! function_exists( 'pp_delete_transient' ) ) {
	/**
	 * Delete transient
	 *
	 * @param string $key transient key.
	 *
	 * @usage function to delete transient value by key
	 */
	function pp_delete_transient( $key = '' ) {
		$transient = pp_get_transient_identifier( $key );
		delete_transient( $transient );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit