A PHP page includes the file named in its page parameter. Including config.php returns a blank page because the server executes it. Which technique BEST reveals its source code?
Show the answer
Correct answerB. Include config.php through the php://filter base64 wrapper
AWhy not this: The data wrapper executes embedded code and needs allow_url_include; it does not disclose config.php.
BWhy this is right: The filter wrapper base64-encodes the file before inclusion, so PHP output is text and not executed.
CWhy not this: Log poisoning aims to run injected code, not to read a file's source, and it needs a writable, readable log.
DWhy not this: A remote URL is RFI; it fetches the tester's file and cannot expose the target's config.php source.
The php://filter wrapper with a base64 conversion returns the file as encoded text, so the PHP is never executed and the source can be decoded. The data wrapper runs supplied code instead of reading the file, so it does not reveal the source.