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 /
mysqlnd /
Delete
Unzip
Name
Size
Permission
Date
Action
.libs
[ DIR ]
drwxr-xr-x
2024-03-12 14:32
CREDITS
70
B
-rw-rw-r--
2022-10-31 11:36
config-win.h
3.08
KB
-rw-rw-r--
2022-10-31 11:36
config.w32
1.42
KB
-rw-rw-r--
2022-10-31 11:36
config9.m4
2.08
KB
-rw-rw-r--
2022-10-31 11:36
mysql_float_to_double.h
1.98
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd.h
18.72
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_alloc.c
22.7
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_alloc.h
4.71
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_alloc.lo
342
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_alloc.o
195.19
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_auth.c
45.43
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_auth.h
4.08
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_auth.lo
339
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_auth.o
227.69
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_block_alloc.c
4.38
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_block_alloc.h
1.56
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_block_alloc.lo
360
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_block_alloc.o
153.95
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_charset.c
37.83
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_charset.h
2.25
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_charset.lo
348
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_charset.o
209.7
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_commands.c
25.48
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_commands.h
1.32
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_commands.lo
351
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_commands.o
181.81
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_connection.c
79.98
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_connection.h
3.17
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_connection.lo
357
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_connection.o
331.89
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_debug.c
23.46
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_debug.h
9.83
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_debug.lo
342
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_debug.o
188.41
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_driver.c
10.55
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_driver.lo
345
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_driver.o
171.83
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_enum_n_def.h
20.66
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_ext_plugin.c
12.61
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_ext_plugin.h
8.13
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_ext_plugin.lo
357
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_ext_plugin.o
166.9
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_libmysql_compat.h
7.42
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_loaddata.c
7.18
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_loaddata.lo
351
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_loaddata.o
162.5
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_plugin.c
5.47
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_plugin.h
1.44
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_plugin.lo
345
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_plugin.o
152.71
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_portability.h
15.23
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_priv.h
2.29
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_protocol_frame_codec.c
19.19
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_protocol_frame_codec.h
1.59
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_protocol_frame_codec.lo
387
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_protocol_frame_codec.o
177.68
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_ps.c
69.48
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_ps.h
2.24
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_ps.lo
333
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_ps.o
253.15
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_ps_codec.c
31.78
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_ps_codec.lo
351
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_ps_codec.o
206.84
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_read_buffer.c
2.67
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_read_buffer.h
1.35
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_read_buffer.lo
360
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_read_buffer.o
84.73
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_result.c
66.36
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_result.h
1.84
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_result.lo
345
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_result.o
256.44
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_result_meta.c
10.53
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_result_meta.h
1.65
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_result_meta.lo
360
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_result_meta.o
167.88
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_reverse_api.c
3.04
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_reverse_api.h
1.83
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_reverse_api.lo
360
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_reverse_api.o
149.34
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_statistics.c
11.79
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_statistics.h
5
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_statistics.lo
357
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_statistics.o
161.57
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_structs.h
64.03
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_vio.c
24.73
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_vio.h
1.54
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_vio.lo
336
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_vio.o
203.3
KB
-rw-r--r--
2024-03-12 14:32
mysqlnd_wireprotocol.c
90.43
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_wireprotocol.h
9.95
KB
-rw-rw-r--
2022-10-31 11:36
mysqlnd_wireprotocol.lo
363
B
-rw-r--r--
2024-03-12 14:32
mysqlnd_wireprotocol.o
309.74
KB
-rw-r--r--
2024-03-12 14:32
php_mysqlnd.c
10.73
KB
-rw-rw-r--
2022-10-31 11:36
php_mysqlnd.h
1.34
KB
-rw-rw-r--
2022-10-31 11:36
php_mysqlnd.lo
336
B
-rw-r--r--
2024-03-12 14:32
php_mysqlnd.o
176.19
KB
-rw-r--r--
2024-03-12 14:32
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. | +----------------------------------------------------------------------+ | Authors: Andrey Hristov <andrey@php.net> | | Ulf Wendel <uw@php.net> | | Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" #include "mysqlnd_priv.h" #include "mysqlnd_debug.h" /* {{{ mysqlnd_local_infile_init */ static int mysqlnd_local_infile_init(void ** ptr, const char * const filename) { MYSQLND_INFILE_INFO *info; php_stream_context *context = NULL; DBG_ENTER("mysqlnd_local_infile_init"); info = ((MYSQLND_INFILE_INFO *)mnd_ecalloc(1, sizeof(MYSQLND_INFILE_INFO))); if (!info) { DBG_RETURN(1); } *ptr = info; /* check open_basedir */ if (PG(open_basedir)) { if (php_check_open_basedir_ex(filename, 0) == -1) { strcpy(info->error_msg, "open_basedir restriction in effect. Unable to open file"); info->error_no = CR_UNKNOWN_ERROR; DBG_RETURN(1); } } info->filename = filename; info->fd = php_stream_open_wrapper_ex((char *)filename, "r", 0, NULL, context); if (info->fd == NULL) { snprintf((char *)info->error_msg, sizeof(info->error_msg), "Can't find file '%-.64s'.", filename); info->error_no = MYSQLND_EE_FILENOTFOUND; DBG_RETURN(1); } DBG_RETURN(0); } /* }}} */ /* {{{ mysqlnd_local_infile_read */ static int mysqlnd_local_infile_read(void * ptr, zend_uchar * buf, unsigned int buf_len) { MYSQLND_INFILE_INFO *info = (MYSQLND_INFILE_INFO *)ptr; int count; DBG_ENTER("mysqlnd_local_infile_read"); count = (int) php_stream_read(info->fd, (char *) buf, buf_len); if (count < 0) { strcpy(info->error_msg, "Error reading file"); info->error_no = CR_UNKNOWN_ERROR; } DBG_RETURN(count); } /* }}} */ /* {{{ mysqlnd_local_infile_error */ static int mysqlnd_local_infile_error(void * ptr, char *error_buf, unsigned int error_buf_len) { MYSQLND_INFILE_INFO *info = (MYSQLND_INFILE_INFO *)ptr; DBG_ENTER("mysqlnd_local_infile_error"); if (info) { strlcpy(error_buf, info->error_msg, error_buf_len); DBG_INF_FMT("have info, %d", info->error_no); DBG_RETURN(info->error_no); } strlcpy(error_buf, "Unknown error", error_buf_len); DBG_INF_FMT("no info, %d", CR_UNKNOWN_ERROR); DBG_RETURN(CR_UNKNOWN_ERROR); } /* }}} */ /* {{{ mysqlnd_local_infile_end */ static void mysqlnd_local_infile_end(void * ptr) { MYSQLND_INFILE_INFO *info = (MYSQLND_INFILE_INFO *)ptr; if (info) { /* php_stream_close segfaults on NULL */ if (info->fd) { php_stream_close(info->fd); info->fd = NULL; } mnd_efree(info); } } /* }}} */ /* {{{ mysqlnd_local_infile_default */ PHPAPI void mysqlnd_local_infile_default(MYSQLND_CONN_DATA * conn) { conn->infile.local_infile_init = mysqlnd_local_infile_init; conn->infile.local_infile_read = mysqlnd_local_infile_read; conn->infile.local_infile_error = mysqlnd_local_infile_error; conn->infile.local_infile_end = mysqlnd_local_infile_end; } /* }}} */ static const char *lost_conn = "Lost connection to MySQL server during LOAD DATA of a local file"; /* {{{ mysqlnd_handle_local_infile */ enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, zend_bool * is_warning) { zend_uchar *buf = NULL; zend_uchar empty_packet[MYSQLND_HEADER_SIZE]; enum_func_status result = FAIL; unsigned int buflen = 4096; void *info = NULL; int bufsize; size_t ret; MYSQLND_INFILE infile; MYSQLND_PFC * net = conn->protocol_frame_codec; MYSQLND_VIO * vio = conn->vio; DBG_ENTER("mysqlnd_handle_local_infile"); if (!(conn->options->flags & CLIENT_LOCAL_FILES)) { php_error_docref(NULL, E_WARNING, "LOAD DATA LOCAL INFILE forbidden"); SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "LOAD DATA LOCAL INFILE is forbidden, check mysqli.allow_local_infile"); /* write empty packet to server */ ret = net->data->m.send(net, vio, empty_packet, 0, conn->stats, conn->error_info); *is_warning = TRUE; goto infile_error; } infile = conn->infile; /* allocate buffer for reading data */ buf = (zend_uchar *) mnd_ecalloc(1, buflen); *is_warning = FALSE; /* init handler: allocate read buffer and open file */ if (infile.local_infile_init(&info, (char *)filename)) { char tmp_buf[sizeof(conn->error_info->error)]; int tmp_error_no; *is_warning = TRUE; /* error occurred */ tmp_error_no = infile.local_infile_error(info, tmp_buf, sizeof(tmp_buf)); SET_CLIENT_ERROR(conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf); /* write empty packet to server */ ret = net->data->m.send(net, vio, empty_packet, 0, conn->stats, conn->error_info); goto infile_error; } /* read data */ while ((bufsize = infile.local_infile_read (info, buf + MYSQLND_HEADER_SIZE, buflen - MYSQLND_HEADER_SIZE)) > 0) { if ((ret = net->data->m.send(net, vio, buf, bufsize, conn->stats, conn->error_info)) == 0) { DBG_ERR_FMT("Error during read : %d %s %s", CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn); SET_CLIENT_ERROR(conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn); goto infile_error; } } /* send empty packet for eof */ if ((ret = net->data->m.send(net, vio, empty_packet, 0, conn->stats, conn->error_info)) == 0) { SET_CLIENT_ERROR(conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn); goto infile_error; } /* error during read occurred */ if (bufsize < 0) { char tmp_buf[sizeof(conn->error_info->error)]; int tmp_error_no; *is_warning = TRUE; DBG_ERR_FMT("Bufsize < 0, warning, %d %s %s", CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn); tmp_error_no = infile.local_infile_error(info, tmp_buf, sizeof(tmp_buf)); SET_CLIENT_ERROR(conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf); goto infile_error; } result = PASS; infile_error: /* get response from server and update upsert values */ if (FAIL == conn->payload_decoder_factory->m.send_command_handle_response( conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_QUERY, FALSE, conn->error_info, conn->upsert_status, &conn->last_message)) { result = FAIL; } (*conn->infile.local_infile_end)(info); if (buf) { mnd_efree(buf); } DBG_INF_FMT("%s", result == PASS? "PASS":"FAIL"); DBG_RETURN(result); } /* }}} */