Directory traversal (directory listing) vulnerabilities occur when a web server exposes folder contents to visitors who navigate directly to a directory without an index file. This PHP command-line tool addresses that risk by recursively scanning a directory tree and placing an index.php file into every subdirectory that lacks one, effectively blocking unauthorized directory browsing.
- Run via the command line with
--add to insert index.php files recursively, or --remove to clean them up across an entire directory tree. - Supports swappable index.php templates: choose between a 404 error response or a redirect to the parent directory, depending on your preferred security behaviour.
- Non-destructive by default: adding files will not overwrite any existing index.php files already in place.
- Can be integrated into any PHP project as a Composer dependency for automated use.
This tool is suited for PHP developers and server administrators who need a quick, scriptable way to harden a PrestaShop installation or any PHP-based project against directory traversal exposure. It is particularly useful when deploying new module directories or restructuring a site where index files may be missing.
Comments (0)
Your review appreciation cannot be sent
Report comment
Report sent
Your report cannot be sent