上传文件至 src

This commit is contained in:
jiangsir 2024-09-10 18:53:21 +08:00
parent 39286cbb5e
commit 942da17110
2 changed files with 52 additions and 0 deletions

25
src/index.php Normal file
View File

@ -0,0 +1,25 @@
<?php
highlight_file('source.txt');
echo "<br><br>";
$flag = 'FLAGFLAGFLAG';
$kunkun = 'Give me the flag!';
$ii = 'No this. Get out!';
if(!isset($_GET['flag']) && !isset($_POST['flag'])){
exit($kunkun);
}
if($_POST['flag'] === 'flag' || $_GET['flag'] === 'flag'){
exit($ii);
}
foreach ($_POST as $key => $value) {
$$key = $value;
}
foreach ($_GET as $key => $value) {
$$key = $$value;
}
echo 'the flag is : ' . $flag;

27
src/source.txt Normal file
View File

@ -0,0 +1,27 @@
<?php
highlight_file('source.txt');
echo "<br><br>";
$flag = 'xxxxxxxx';
$kunkun = 'Give me the flag!';
$ii = 'No this. Get out!';
if(!isset($_GET['flag']) && !isset($_POST['flag'])){
exit($kunkun);
}
if($_POST['flag'] === 'flag' || $_GET['flag'] === 'flag'){
exit($ii);
}
foreach ($_POST as $key => $value) {
$$key = $value;
}
foreach ($_GET as $key => $value) {
$$key = $$value;
}
echo 'the flag is : ' . $flag;
?>