Your mission is to exploit this code, which have obviously an LFI vulnerability:
GeSHi ' Ed PHP code
12 |
$filename = ' pages/'. (Isset ($_get["file"])? $_get["File"]: "Welcome"). HTML '; include $filename; |
There is a lot of important stuff in. /solution.php, so please include and execute the this file for us.
Here is a few examples of the script in action (in the box below):
Index.php?file=welcome
Index.php?file=news
Index.php?file=forums
For debugging purposes, your may look at the whole source again, also as highlighted version.
Solving:
Because the string after adding a ". html", completely do not know how to deal with, to search the puzzle, found can be truncated with% 00来, and then tried it? file=. /.. /solution.php% 00, found this file does not exist, looked at the problem finding is? File=. /.. /solution.php% 00..
wechall_training:php LFI (Exploit, PHP, Training)