<?php
errorreporting(0);
require _DIR.’/flag.php’;
$exam = 'return\''.sha1(time()).'\';';
if (!isset($_GET['flag'])) {
echo '<a href="./?flag='.$exam.'">Click here</a>';
}
else if (strlen($_GET['flag']) != strlen($exam)) {
echo '长度不允许';
}
else if (preg_match('/`|"|\.|\\\\|\(|\)|\[|\]|_|flag|echo|print|require|include|die|exit/is', $_GET['flag'])) {
echo '关键字不允许';
}
else if (eval($_GET['flag']) === sha1($flag)) {
echo $flag;
}
else {
echo '马老师发生甚么事了';
}
echo '<hr>';
highlight_file(__FILE__);
?>
http://127.0.0.1/?flag=return%2759d11ac50f2c589734368512e23d392f15b04eba%27;
我知道哈希值是破局关键,但是怎么试都不对
打赏我,让我更有动力~
© 2016 - 2024 掌控者 All Rights Reserved.