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 /
win32 /
Delete
Unzip
Name
Size
Permission
Date
Action
build
[ DIR ]
drwxrwxr-x
2022-10-31 11:36
codepage.c
16.57
KB
-rw-rw-r--
2022-10-31 11:36
codepage.h
6.5
KB
-rw-rw-r--
2022-10-31 11:36
console.c
3.26
KB
-rw-rw-r--
2022-10-31 11:36
console.h
2.44
KB
-rw-rw-r--
2022-10-31 11:36
cp_enc_map.c
11.49
KB
-rw-rw-r--
2022-10-31 11:36
cp_enc_map_gen.c
13.56
KB
-rw-rw-r--
2022-10-31 11:36
dllmain.c
2.9
KB
-rw-rw-r--
2022-10-31 11:36
fnmatch.c
5.77
KB
-rw-rw-r--
2022-10-31 11:36
fnmatch.h
2.44
KB
-rw-rw-r--
2022-10-31 11:36
ftok.c
2.03
KB
-rw-rw-r--
2022-10-31 11:36
getrusage.c
2.51
KB
-rw-rw-r--
2022-10-31 11:36
getrusage.h
2.71
KB
-rw-rw-r--
2022-10-31 11:36
glob.c
20.8
KB
-rw-rw-r--
2022-10-31 11:36
glob.h
4.22
KB
-rw-rw-r--
2022-10-31 11:36
globals.c
2.17
KB
-rw-rw-r--
2022-10-31 11:36
grp.h
1.25
KB
-rw-rw-r--
2022-10-31 11:36
inet.c
1.3
KB
-rw-rw-r--
2022-10-31 11:36
inet.h
1.28
KB
-rw-rw-r--
2022-10-31 11:36
ioutil.c
32.61
KB
-rw-rw-r--
2022-10-31 11:36
ioutil.h
21.87
KB
-rw-rw-r--
2022-10-31 11:36
ipc.h
1.4
KB
-rw-rw-r--
2022-10-31 11:36
nice.c
3.29
KB
-rw-rw-r--
2022-10-31 11:36
nice.h
1.2
KB
-rw-rw-r--
2022-10-31 11:36
param.h
990
B
-rw-rw-r--
2022-10-31 11:36
php_inttypes.h
8
KB
-rw-rw-r--
2022-10-31 11:36
php_registry.h
1.27
KB
-rw-rw-r--
2022-10-31 11:36
php_stdint.h
7.58
KB
-rw-rw-r--
2022-10-31 11:36
php_win32_globals.h
2.03
KB
-rw-rw-r--
2022-10-31 11:36
readdir.c
5.05
KB
-rw-rw-r--
2022-10-31 11:36
readdir.h
1.08
KB
-rw-rw-r--
2022-10-31 11:36
registry.c
8.48
KB
-rw-rw-r--
2022-10-31 11:36
select.c
5.12
KB
-rw-rw-r--
2022-10-31 11:36
select.h
1.3
KB
-rw-rw-r--
2022-10-31 11:36
sendmail.c
29.69
KB
-rw-rw-r--
2022-10-31 11:36
sendmail.h
1.81
KB
-rw-rw-r--
2022-10-31 11:36
signal.c
4.92
KB
-rw-rw-r--
2022-10-31 11:36
signal.h
384
B
-rw-rw-r--
2022-10-31 11:36
sockets.c
2.64
KB
-rw-rw-r--
2022-10-31 11:36
sockets.h
1.52
KB
-rw-rw-r--
2022-10-31 11:36
syslog.h
2.64
KB
-rw-rw-r--
2022-10-31 11:36
time.c
3.34
KB
-rw-rw-r--
2022-10-31 11:36
time.h
2.06
KB
-rw-rw-r--
2022-10-31 11:36
unistd.h
105
B
-rw-rw-r--
2022-10-31 11:36
winutil.c
23.78
KB
-rw-rw-r--
2022-10-31 11:36
winutil.h
2.37
KB
-rw-rw-r--
2022-10-31 11:36
wsyslog.c
4.32
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
#include <malloc.h> #include <string.h> #include <errno.h> #include "php.h" #include "readdir.h" #include "win32/ioutil.h" /********************************************************************** * Implement dirent-style opendir/readdir/rewinddir/closedir on Win32 * * Functions defined are opendir(), readdir(), rewinddir() and * closedir() with the same prototypes as the normal dirent.h * implementation. * * Does not implement telldir(), seekdir(), or scandir(). The dirent * struct is compatible with Unix, except that d_ino is always 1 and * d_off is made up as we go along. * * The DIR typedef is not compatible with Unix. **********************************************************************/ #ifdef __cplusplus extern "C" { #endif DIR *opendir(const char *dir) {/*{{{*/ DIR *dp; wchar_t *filespecw, *resolvedw; HANDLE handle; char resolved_path_buff[MAXPATHLEN]; size_t resolvedw_len, filespecw_len, index; zend_bool might_need_prefix; if (!VCWD_REALPATH(dir, resolved_path_buff)) { return NULL; } resolvedw = php_win32_ioutil_conv_any_to_w(resolved_path_buff, PHP_WIN32_CP_IGNORE_LEN, &resolvedw_len); if (!resolvedw) { return NULL; } might_need_prefix = resolvedw_len >= 3 && PHP_WIN32_IOUTIL_IS_LETTERW(resolvedw[0]) && L':' == resolvedw[1] && PHP_WIN32_IOUTIL_IS_SLASHW(resolvedw[2]); filespecw_len = resolvedw_len + 2; if (filespecw_len >= _MAX_PATH && might_need_prefix) { filespecw_len += PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW; } filespecw = (wchar_t *)malloc((filespecw_len + 1)*sizeof(wchar_t)); if (filespecw == NULL) { free(resolvedw); return NULL; } if (filespecw_len >= _MAX_PATH && might_need_prefix) { wcscpy(filespecw, PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW); wcscpy(filespecw + PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW, resolvedw); index = resolvedw_len + PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW - 1; } else { wcscpy(filespecw, resolvedw); index = resolvedw_len - 1; } if (index >= 0 && filespecw[index] == L'/' || index == 0 && filespecw[index] == L'\\') filespecw[index] = L'\0'; wcscat(filespecw, L"\\*"); dp = (DIR *) calloc(1, sizeof(DIR) + (_MAX_FNAME*5+1)*sizeof(char)); if (dp == NULL) { free(filespecw); free(resolvedw); return NULL; } if ((handle = FindFirstFileExW(filespecw, FindExInfoBasic, &(dp->fileinfo), FindExSearchNameMatch, NULL, FIND_FIRST_EX_LARGE_FETCH)) == INVALID_HANDLE_VALUE) { DWORD err = GetLastError(); if (err == ERROR_NO_MORE_FILES || err == ERROR_FILE_NOT_FOUND) { dp->finished = 1; } else { free(dp); free(filespecw); free(resolvedw); return NULL; } } dp->dirw = _wcsdup(resolvedw); dp->handle = handle; dp->offset = 0; dp->finished = 0; free(filespecw); free(resolvedw); return dp; }/*}}}*/ struct dirent *readdir(DIR *dp) {/*{{{*/ char *_tmp; size_t reclen; if (!dp || dp->finished) return NULL; if (dp->offset != 0) { if (FindNextFileW(dp->handle, &(dp->fileinfo)) == 0) { dp->finished = 1; return NULL; } } _tmp = php_win32_cp_conv_w_to_any(dp->fileinfo.cFileName, PHP_WIN32_CP_IGNORE_LEN, &reclen); if (!_tmp) { /* wide to utf8 failed, should never happen. */ return NULL; } memmove(dp->dent.d_name, _tmp, reclen + 1); free(_tmp); dp->dent.d_reclen = (unsigned short)reclen; dp->offset++; dp->dent.d_ino = 1; dp->dent.d_off = dp->offset; return &(dp->dent); }/*}}}*/ int closedir(DIR *dp) {/*{{{*/ if (!dp) return 0; /* It is valid to scan an empty directory but we have an invalid handle in this case (no first file found). */ if (dp->handle != INVALID_HANDLE_VALUE) { FindClose(dp->handle); } if (dp->dirw) free(dp->dirw); if (dp) free(dp); return 0; }/*}}}*/ int rewinddir(DIR *dp) {/*{{{*/ /* Re-set to the beginning */ wchar_t *filespecw; HANDLE handle; size_t dirw_len, filespecw_len, index; zend_bool might_need_prefix; FindClose(dp->handle); dp->offset = 0; dp->finished = 0; /* XXX save the dir len into the struct. */ dirw_len = wcslen((wchar_t *)dp->dirw); might_need_prefix = dirw_len >= 3 && PHP_WIN32_IOUTIL_IS_LETTERW(dp->dirw[0]) && L':' == dp->dirw[1] && PHP_WIN32_IOUTIL_IS_SLASHW(dp->dirw[2]); filespecw_len = dirw_len + 2; if (filespecw_len >= _MAX_PATH && might_need_prefix) { filespecw_len += PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW; } filespecw = (wchar_t *)malloc((filespecw_len + 1)*sizeof(wchar_t)); if (filespecw == NULL) { return -1; } if (filespecw_len >= _MAX_PATH && might_need_prefix) { wcscpy(filespecw, PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW); wcscpy(filespecw + PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW, dp->dirw); index = dirw_len + PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW - 1; } else { wcscpy(filespecw, dp->dirw); index = dirw_len - 1; } if (index >= 0 && (filespecw[index] == L'/' || (filespecw[index] == L'\\' && index == 0))) filespecw[index] = L'\0'; wcscat(filespecw, L"\\*"); if ((handle = FindFirstFileExW(filespecw, FindExInfoBasic, &(dp->fileinfo), FindExSearchNameMatch, NULL, FIND_FIRST_EX_LARGE_FETCH)) == INVALID_HANDLE_VALUE) { dp->finished = 1; } free(filespecw); dp->handle = handle; return 0; }/*}}}*/ #ifdef __cplusplus } #endif