Advertisement
ZaraByte

Remote file inclusion example

Apr 4th, 2012
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Example of vulnerable php code that will lead to Remote file inclusion attacks.
  2.  
  3. if your not sure how to load pages using the vulnerable code:
  4. <a href="index.php?page=main.php">Home</a>
  5. - ZaraByte (www.zarabyte.com)
  6.  
  7. Code:
  8. <?php
  9. $page = $_GET['page'];
  10. if (!empty($page)) {
  11. include($page);
  12. }
  13. else {
  14. include('main.php');
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement