没有解题思路~~~

zcm   ·   发表于 2022-09-18 12:55:25   ·   提问求助

代码审计题

<?php
errorreporting(0);
include(“flag.php”);
highlightfile(__FILE
);
$giveme = ‘can can need flag!’;
$getout = ‘No! flag.Try again. Come on!’;
if(!isset($_GET[‘flag’]) && !isset($_POST[‘flag’])){
exit($giveme);
}

if($_POST[‘flag’] === ‘flag’ || $_GET[‘flag’] === ‘flag’){
exit($getout);
}

foreach ($_POST as $key => $value) {
$$key = $value;
}

foreach ($_GET as $key => $value) {
key = value;
}

echo ‘the flag is : ‘ . $flag;

?> can can need flag!

打赏我,让我更有动力~

0 条回复   |  直到 2022-9-18 | 673 次浏览
登录后才可发表内容
返回顶部 投诉反馈

© 2016 - 2024 掌控者 All Rights Reserved.