没有解题思路~~~

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 Reply   |  Until 15天前 | 138 View
LoginCan Publish Content
返回顶部 投诉反馈

© 2016 - 2022 掌控者 All Rights Reserved.