上传文件至 src
This commit is contained in:
parent
51936401ce
commit
2aafed8b07
26
src/index.php
Normal file
26
src/index.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
highlight_file('source.txt');
|
||||
echo "<br><br>";
|
||||
|
||||
$flag = 'FLAGFLAGFLAG';
|
||||
$msg_giveme = 'Give me the flag!';
|
||||
$msg_getout = 'No this. Get out!';
|
||||
if(!isset($_GET['flag']) && !isset($_POST['flag'])){
|
||||
exit($msg_giveme);
|
||||
}
|
||||
|
||||
if($_POST['flag'] === 'flag' || $_GET['flag'] === 'flag'){
|
||||
exit($msg_getout);
|
||||
}
|
||||
|
||||
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
27
src/source.txt
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
highlight_file('source.txt');
|
||||
echo "<br><br>";
|
||||
|
||||
$flag = 'xxxxxxxx';
|
||||
$msg_giveme = 'Give me the flag!';
|
||||
$msg_getout = 'No this. Get out!';
|
||||
if(!isset($_GET['flag']) && !isset($_POST['flag'])){
|
||||
exit($msg_giveme);
|
||||
}
|
||||
|
||||
if($_POST['flag'] === 'flag' || $_GET['flag'] === 'flag'){
|
||||
exit($msg_getout);
|
||||
}
|
||||
|
||||
foreach ($_POST as $key => $value) {
|
||||
$$key = $value;
|
||||
}
|
||||
|
||||
foreach ($_GET as $key => $value) {
|
||||
$$key = $$value;
|
||||
}
|
||||
|
||||
echo 'the flag is : ' . $flag;
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user