uawdijnntqw1x1x1
IP : 3.22.42.92
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
.
/
.trash
/
install.1
/
..
/
system.1
/
library
/
session
/
file.php
/
/
<?php namespace Opencart\System\Library\Session; class File { public function __construct(\Opencart\System\Engine\Registry $registry) { $this->config = $registry->get('config'); } public function read(string $session_id): array { $file = DIR_SESSION . 'sess_' . basename($session_id); if (is_file($file)) { $size = filesize($file); if ($size) { $handle = fopen($file, 'r'); flock($handle, LOCK_SH); $data = fread($handle, $size); flock($handle, LOCK_UN); fclose($handle); return json_decode($data, true); } else { return []; } } return []; } public function write(string $session_id, array $data): bool { $file = DIR_SESSION . 'sess_' . basename($session_id); $handle = fopen($file, 'c'); flock($handle, LOCK_EX); fwrite($handle, json_encode($data)); ftruncate($handle, ftell($handle)); fflush($handle); flock($handle, LOCK_UN); fclose($handle); return true; } public function destroy(string $session_id): void { $file = DIR_SESSION . 'sess_' . basename($session_id); if (is_file($file)) { unlink($file); } } public function gc(): void { if (round(rand(1, $this->config->get('session_divisor') / $this->config->get('session_probability'))) == 1) { $expire = time() - $this->config->get('session_expire'); $files = glob(DIR_SESSION . 'sess_*'); foreach ($files as $file) { if (is_file($file) && filemtime($file) < $expire) { unlink($file); } } } } }
/home/sudancam/./.trash/install.1/../system.1/library/session/file.php