Directory traversal vulnerable example


SUBMITTED BY: Guest

DATE: May 30, 2013, 3:54 a.m.

FORMAT: PHP

SIZE: 307 Bytes

HITS: 283051

  1. <?
  2. $id = $_GET['archivo'];
  3. $enlace = "admin/imagenes_galeria/".$id;
  4. $rest = substr($id, -3);
  5. header ("Content-Disposition: attachment; filename=".$id);
  6. header ("Content-Type: image/$rest");
  7. header ("Content-Length: ".filesize($enlace));
  8. readfile($enlace);
  9. ?>

comments powered by Disqus