# a good interview question for a php developer
- $ cat test.php
- <?
- if( !isset($_GET['filename']) || strpos($_GET['filename'],"../") ) {
- die();
- }
- echo "Hacked.";
- ?>
- $ wget -q -O/dev/stdout http://localhost/test.php?filename=../../../../etc/hosts
- Hacked.
Get them to explain why you’re hacked. If they don’t know, don’t give them the job.