<h1>IO SYSTEM BUILD</h1>
<?php

$f = @fopen("index.php", "r");
$txt = fread($f, filesize("index.php"));

if (strpos($txt, '%PASSWORD%') === false) {
    echo "already build";
    exit();
}

if (!isset($_GET["pwd"])) {
    echo "invalid password";
    exit();
} else {
    fclose($f);
    $txt = str_replace('%PASSWORD%', $_GET["pwd"], $txt);
    $f = fopen("index.php", "w");
    fwrite($f, $txt);
    fclose($f);
}

echo "build complete";