Commit 9a22d099 authored by Dominik Rosiek's avatar Dominik Rosiek

File inclusion flags

parent 728ff306
Już blisko ...
<?php
//AGH_{FLAGA}
php.ini:
allow_url_include should be enabled
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$flag = 'AGH_{FLAGA}';
$site = filter_input(INPUT_GET, 'site');
if(!$site){
$site='site';
}
$header = filter_input(INPUT_SERVER, 'HTTP_KYN');
if($header !== 'test'){
echo "Nie masz tutaj wstępu...";
exit;
}
?>
Witaj, masz tu parę linków :)<br />
<a href="?site=site1">Strona 1</a> |
<a href="?site=site2">Strona 2</a> |
<a href="?site=site3">Strona 3</a> |
<a href="?site=site4">Strona 4</a> |
<br />
<pre>
<?php
header("FLAG: {$flag}");
chdir('Hkuas7VKk7');
include_once "{$site}.txt";
echo "<pre>";
?>
</pre>
\ No newline at end of file
......@@ -4,4 +4,6 @@ taiga_46:
taiga_48:
- supereasy
- Zwykłe przekierowania w JS
php_1:
- medium
- niestandardowy naglowek + remote file inclusion
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment