Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Example of vulnerable php code that will lead to Local file inclusion attacks.
- if your not sure how to load pages using the vulnerable code:
- <a href="index.php?file=main.php">Home</a> You will need to add a folder called "pages" and store your php files in if you wanna make your own demo site for testing LFI attacks.
- - ZaraByte (www.zarabyte.com)
- Code:
- <?php
- $file = $_GET['file'];
- if(isset($file))
- {
- include("pages/$file");
- }
- else
- {
- include("main.php");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement