代码审计题
<?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!
打赏我,让我更有动力~
© 2016 - 2024 掌控者 All Rights Reserved.