Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
session /
Delete
Unzip
Name
Size
Permission
Date
Action
.libs
[ DIR ]
drwxr-xr-x
2024-03-12 14:29
tests
[ DIR ]
drwxrwxr-x
2022-10-31 11:36
CREDITS
42
B
-rw-rw-r--
2022-10-31 11:36
config.m4
1.34
KB
-rw-rw-r--
2022-10-31 11:36
config.w32
393
B
-rw-rw-r--
2022-10-31 11:36
mod_files.bat
1.28
KB
-rw-rw-r--
2022-10-31 11:36
mod_files.c
19.17
KB
-rw-rw-r--
2022-10-31 11:36
mod_files.h
1.27
KB
-rw-rw-r--
2022-10-31 11:36
mod_files.lo
330
B
-rw-r--r--
2024-03-12 14:29
mod_files.o
114.3
KB
-rw-r--r--
2024-03-12 14:29
mod_files.sh
1.98
KB
-rwxrwxr-x
2022-10-31 11:36
mod_mm.c
9.8
KB
-rw-rw-r--
2022-10-31 11:36
mod_mm.h
1.35
KB
-rw-rw-r--
2022-10-31 11:36
mod_mm.lo
321
B
-rw-r--r--
2024-03-12 14:29
mod_mm.o
66.46
KB
-rw-r--r--
2024-03-12 14:29
mod_user.c
5.75
KB
-rw-rw-r--
2022-10-31 11:36
mod_user.h
1.27
KB
-rw-rw-r--
2022-10-31 11:36
mod_user.lo
327
B
-rw-r--r--
2024-03-12 14:29
mod_user.o
109.16
KB
-rw-r--r--
2024-03-12 14:29
mod_user_class.c
5.48
KB
-rw-rw-r--
2022-10-31 11:36
mod_user_class.lo
345
B
-rw-r--r--
2024-03-12 14:29
mod_user_class.o
96.53
KB
-rw-r--r--
2024-03-12 14:29
php_session.h
11.19
KB
-rw-rw-r--
2022-10-31 11:36
session.c
96.26
KB
-rw-rw-r--
2022-10-31 11:36
session.lo
324
B
-rw-r--r--
2024-03-12 14:29
session.o
654.16
KB
-rw-r--r--
2024-03-12 14:29
Save
Rename
/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Arpad Ray <arpad@php.net> | +----------------------------------------------------------------------+ */ #include "php.h" #include "php_session.h" #define PS_SANITY_CHECK \ if (PS(session_status) != php_session_active) { \ php_error_docref(NULL, E_WARNING, "Session is not active"); \ RETURN_FALSE; \ } \ if (PS(default_mod) == NULL) { \ php_error_docref(NULL, E_CORE_ERROR, "Cannot call default session handler"); \ RETURN_FALSE; \ } #define PS_SANITY_CHECK_IS_OPEN \ PS_SANITY_CHECK; \ if (!PS(mod_user_is_open)) { \ php_error_docref(NULL, E_WARNING, "Parent session handler is not open"); \ RETURN_FALSE; \ } /* {{{ proto bool SessionHandler::open(string save_path, string session_name) Wraps the old open handler */ PHP_METHOD(SessionHandler, open) { char *save_path = NULL, *session_name = NULL; size_t save_path_len, session_name_len; int ret; PS_SANITY_CHECK; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &save_path, &save_path_len, &session_name, &session_name_len) == FAILURE) { return; } PS(mod_user_is_open) = 1; zend_try { ret = PS(default_mod)->s_open(&PS(mod_data), save_path, session_name); } zend_catch { PS(session_status) = php_session_none; zend_bailout(); } zend_end_try(); RETVAL_BOOL(SUCCESS == ret); } /* }}} */ /* {{{ proto bool SessionHandler::close() Wraps the old close handler */ PHP_METHOD(SessionHandler, close) { int ret; PS_SANITY_CHECK_IS_OPEN; // don't return on failure, since not closing the default handler // could result in memory leaks or other nasties zend_parse_parameters_none(); PS(mod_user_is_open) = 0; zend_try { ret = PS(default_mod)->s_close(&PS(mod_data)); } zend_catch { PS(session_status) = php_session_none; zend_bailout(); } zend_end_try(); RETVAL_BOOL(SUCCESS == ret); } /* }}} */ /* {{{ proto bool SessionHandler::read(string id) Wraps the old read handler */ PHP_METHOD(SessionHandler, read) { zend_string *val; zend_string *key; PS_SANITY_CHECK_IS_OPEN; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &key) == FAILURE) { return; } if (PS(default_mod)->s_read(&PS(mod_data), key, &val, PS(gc_maxlifetime)) == FAILURE) { RETURN_FALSE; } RETURN_STR(val); } /* }}} */ /* {{{ proto bool SessionHandler::write(string id, string data) Wraps the old write handler */ PHP_METHOD(SessionHandler, write) { zend_string *key, *val; PS_SANITY_CHECK_IS_OPEN; if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &key, &val) == FAILURE) { return; } RETURN_BOOL(SUCCESS == PS(default_mod)->s_write(&PS(mod_data), key, val, PS(gc_maxlifetime))); } /* }}} */ /* {{{ proto bool SessionHandler::destroy(string id) Wraps the old destroy handler */ PHP_METHOD(SessionHandler, destroy) { zend_string *key; PS_SANITY_CHECK_IS_OPEN; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &key) == FAILURE) { return; } RETURN_BOOL(SUCCESS == PS(default_mod)->s_destroy(&PS(mod_data), key)); } /* }}} */ /* {{{ proto bool SessionHandler::gc(int maxlifetime) Wraps the old gc handler */ PHP_METHOD(SessionHandler, gc) { zend_long maxlifetime; zend_long nrdels = -1; PS_SANITY_CHECK_IS_OPEN; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &maxlifetime) == FAILURE) { return; } if (PS(default_mod)->s_gc(&PS(mod_data), maxlifetime, &nrdels) == FAILURE) { RETURN_FALSE; } RETURN_LONG(nrdels); } /* }}} */ /* {{{ proto char SessionHandler::create_sid() Wraps the old create_sid handler */ PHP_METHOD(SessionHandler, create_sid) { zend_string *id; PS_SANITY_CHECK; if (zend_parse_parameters_none() == FAILURE) { return; } id = PS(default_mod)->s_create_sid(&PS(mod_data)); RETURN_STR(id); } /* }}} */ /* {{{ proto char SessionUpdateTimestampHandler::validateId(string id) Simply return TRUE */ PHP_METHOD(SessionHandler, validateId) { zend_string *key; PS_SANITY_CHECK_IS_OPEN; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &key) == FAILURE) { return; } /* Legacy save handler may not support validate_sid API. Return TRUE. */ RETURN_TRUE; } /* }}} */ /* {{{ proto bool SessionUpdateTimestampHandler::updateTimestamp(string id, string data) Simply call update_timestamp */ PHP_METHOD(SessionHandler, updateTimestamp) { zend_string *key, *val; PS_SANITY_CHECK_IS_OPEN; if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &key, &val) == FAILURE) { return; } /* Legacy save handler may not support update_timestamp API. Just write. */ RETVAL_BOOL(SUCCESS == PS(default_mod)->s_write(&PS(mod_data), key, val, PS(gc_maxlifetime))); } /* }}} */