Commit ada7fde6 authored by Dominik Rosiek's avatar Dominik Rosiek

php remote file include

parent 5af0fbef
Już blisko ... Jesteś już bardzo blisko ;)
<?php <?php
//AGH_{FLAGA} //KYN2016_NieLubiePlackuff
...@@ -2,19 +2,28 @@ ...@@ -2,19 +2,28 @@
ini_set('display_errors', 1); ini_set('display_errors', 1);
ini_set('display_startup_errors', 1); ini_set('display_startup_errors', 1);
error_reporting(E_ALL); error_reporting(E_ALL);
$flag = 'AGH_{FLAGA}'; $flag = 'KYN2016_WartoSieGlowic';
$site = filter_input(INPUT_GET, 'site'); $site = filter_input(INPUT_GET, 'site');
if(!$site){ if(!$site){
$site='site'; $site='site';
} }
$header = filter_input(INPUT_SERVER, 'HTTP_KYN'); $header = filter_input(INPUT_SERVER, 'HTTP_KYN2016');
?>
if($header !== 'test'){ <html>
echo "Nie masz tutaj wstępu..."; <head>
</head>
</html>
<?php
if($header){
?>
Nie masz tutaj wstępu, ale pamiętaj:<br />
<pre>Krak Your Net 2016 na mojej głowie</pre>
<?php
exit; exit;
} }
?> ?>
Witaj, masz tu parę linków :)<br /> Witaj, poniżej kilka linków testowych :)<br />
<a href="?site=site1">Strona 1</a> | <a href="?site=site1">Strona 1</a> |
<a href="?site=site2">Strona 2</a> | <a href="?site=site2">Strona 2</a> |
<a href="?site=site3">Strona 3</a> | <a href="?site=site3">Strona 3</a> |
...@@ -22,11 +31,11 @@ Witaj, masz tu parę linków :)<br /> ...@@ -22,11 +31,11 @@ Witaj, masz tu parę linków :)<br />
<br /> <br />
<pre> <pre>
<?php <?php
header("FLAG: {$flag}"); header("KYN2016: {$flag}");
chdir('Hkuas7VKk7'); chdir('Hkuas7VKk7');
include_once "{$site}.txt"; include_once "{$site}.txt";
echo "<pre>"; echo "<pre>";
?> ?>
</pre> </pre>
\ No newline at end of file
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