当前位置:网站首页>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跳转)

边栏推荐
- 8 figures | analyze Eureka's first synchronization registry
- Methods of downloading Foreign Periodicals
- [wechat applet] view container and basic content components
- AI视频智能平台EasyCVR设备录像出现无法播放现象的问题修复
- Router 6/ and the difference with router5
- 广发证券开户是安全可靠的么?怎么开广发证券账户
- Product learning (III) - demand list
- 清除过期缓存条目后可用空间仍不足 - 请考虑增加缓存的最大空间
- [matlab] solve nonlinear programming
- Idea easy to use plug-in summary!!!
猜你喜欢

【推荐技术】基于协同过滤的网络信息推荐技术matlab仿真

比赛即实战!中国软件杯发布全新产业创新赛项,校企可联合参赛

Solve the problem that the class defined in meta-inf.services cannot be read

Jena基于OWL的默认推理查询

关于变量是否线程安全的问题

下载外文期刊的方法

(I) apple has open source, but so what?

如何画产品架构图?
![[wechat applet] view container and basic content components](/img/25/181986ab4bf048854d1d1ca87de637.jpg)
[wechat applet] view container and basic content components

8 张图 | 剖析 Eureka 的首次同步注册表
随机推荐
[wechat applet] to solve button, input and image components
解决无法读取META-INF.services里面定义的类
PAT (Advanced Level) Practice 1057 Stack
Using fuseki query when there are multiple models in TDB
為什麼這麼多人轉行產品經理?產品經理發展前景如何?
Insufficient free space after clearing expired cache entries - consider increasing the maximum cache space
根据输入画有向图
灰度何以跌下神坛?
WiFi settings for raspberry Pie 4
K8S搭建Redis集群
Database objects: view learning records
【分类模型】Q 型聚类分析
SQL语言的学习记录一
Jena基于OWL的默认推理查询
【LINGO】求七个城市最小连线图,使天然气管道价格最低
产品学习(一)——结构图
[matlab] solve nonlinear programming
(I) apple has open source, but so what?
Principle of introducing modules into node
node中引入模块的原理