|
@@ -1,17 +1,37 @@
|
|
<?php include "../top.inc.php"; ?>
|
|
<?php include "../top.inc.php"; ?>
|
|
|
|
|
|
- <form method="POST" action="ns.php">
|
|
|
|
- <label for="subdomain">Domaine :</label>
|
|
|
|
|
|
+ <form method="post">
|
|
|
|
+ <label for="zone">Domaine</label>
|
|
<br>
|
|
<br>
|
|
- <input id="subdomain" placeholder="nic" name="subdomain" type="text">.atope.art
|
|
|
|
|
|
+ <select required="" name="zone" id="zone">
|
|
|
|
+ <option value="" disabled="" selected="">---</option>
|
|
|
|
+
|
|
|
|
+ <?php
|
|
|
|
+ $db = new PDO('sqlite:' . $dbPath);
|
|
|
|
+ $username[0] = $_SESSION['username'];
|
|
|
|
+
|
|
|
|
+ var_dump($username);
|
|
|
|
+
|
|
|
|
+ $req = $db->prepare('SELECT zone FROM zones WHERE username = ?');
|
|
|
|
+ $req->execute($username);
|
|
|
|
+
|
|
|
|
+ $domain = $req->fetch()['zone'];
|
|
|
|
+
|
|
|
|
+ while ($domain != NULL) {
|
|
|
|
+ echo "<option value='" . $domain . "'>" . $domain . "</option>";
|
|
|
|
+ $domain = $req->fetch()['zone'];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ?>
|
|
|
|
+ </select>
|
|
<br>
|
|
<br>
|
|
- <label for="tag">Tag de la clé :</label>
|
|
|
|
|
|
+ <label for="keytag">Tag de la clé</label>
|
|
<br>
|
|
<br>
|
|
- <input id="tag" placeholder="12345" min="1" max="100000" name="tag" type="number">
|
|
|
|
|
|
+ <input required="" id="keytag" placeholder="32768" min="1" max="65535" name="keytag" type="number"><span></span>
|
|
<br>
|
|
<br>
|
|
- <label for="algo">Algorithme :</label>
|
|
|
|
|
|
+ <label for="algo">Algorithme</label>
|
|
<br>
|
|
<br>
|
|
- <select name="algo" id="algo">
|
|
|
|
|
|
+ <select required="" name="algo" id="algo">
|
|
<!-- RFC 8624 : Algorithm Implementation Requirements and Usage Guidance for DNSSEC > Algorithm Selection > DNSKEY Algorithms -->
|
|
<!-- RFC 8624 : Algorithm Implementation Requirements and Usage Guidance for DNSSEC > Algorithm Selection > DNSKEY Algorithms -->
|
|
<!-- https://tools.ietf.org/html/rfc8624.html#section-3.1 -->
|
|
<!-- https://tools.ietf.org/html/rfc8624.html#section-3.1 -->
|
|
<option value="1" disabled="">1 (RSAMD5)</option>
|
|
<option value="1" disabled="">1 (RSAMD5)</option>
|
|
@@ -28,9 +48,9 @@
|
|
<option value="16">16 (ED448)</option>
|
|
<option value="16">16 (ED448)</option>
|
|
</select>
|
|
</select>
|
|
<br>
|
|
<br>
|
|
- <label for="dt">Digest Type :</label>
|
|
|
|
|
|
+ <label for="dt">Digest Type</label>
|
|
<br>
|
|
<br>
|
|
- <select name="dt" id="dt">
|
|
|
|
|
|
+ <select required="" name="dt" id="dt">
|
|
<!-- RFC 8624 : Algorithm Implementation Requirements and Usage Guidance for DNSSEC > Algorithm Selection > DS and CDS Algorithms -->
|
|
<!-- RFC 8624 : Algorithm Implementation Requirements and Usage Guidance for DNSSEC > Algorithm Selection > DS and CDS Algorithms -->
|
|
<!-- https://tools.ietf.org/html/rfc8624.html#section-3.3 -->
|
|
<!-- https://tools.ietf.org/html/rfc8624.html#section-3.3 -->
|
|
<option value="1" disabled="">1 (SHA-1)</option>
|
|
<option value="1" disabled="">1 (SHA-1)</option>
|
|
@@ -39,25 +59,37 @@
|
|
<option value="4">4 (SHA-384)</option>
|
|
<option value="4">4 (SHA-384)</option>
|
|
</select>
|
|
</select>
|
|
<br>
|
|
<br>
|
|
- <label for="ds">Serveur de nom :</label>
|
|
|
|
|
|
+ <label for="key">Delegation Signer</label>
|
|
<br>
|
|
<br>
|
|
- <input id="ds" placeholder="niver.atope.art. 86400 DS 12345 13 4 018F25E4A022463478C9E30136EC53771A1704A0F0B3CE5B883AC9C8A6A55D16B638B4DE70662ACA5295D3669E7CADD9" name="ns" type="text">
|
|
|
|
|
|
+ <input id="key" required="" name="key" type="text" placeholder="018F25E4A022463478C9E30136EC53771A1704A0F0B3CE5B883AC9C8A6A55D16B638B4DE70662ACA5295D3669E7CADD9">
|
|
<br>
|
|
<br>
|
|
<input type="submit">
|
|
<input type="submit">
|
|
</form>
|
|
</form>
|
|
|
|
|
|
<?php
|
|
<?php
|
|
|
|
|
|
- if (isset($_POST['subdomain']) AND isset($_POST['ds']) AND isset($_SESSION['username'])) {
|
|
|
|
|
|
+ if (isset($_POST['zone']) AND isset($_POST['keytag']) AND isset($_POST['algo']) AND isset($_POST['key']) AND isset($_SESSION['username'])) {
|
|
|
|
|
|
- if (isset($_POST['algo'])
|
|
|
|
- AND (
|
|
|
|
- $_POST['algo'] == "8"
|
|
|
|
|
|
+ if ($_POST['algo'] == "8"
|
|
|
|
+ OR $_POST['algo'] == "13"
|
|
OR $_POST['algo'] == "14"
|
|
OR $_POST['algo'] == "14"
|
|
OR $_POST['algo'] == "15"
|
|
OR $_POST['algo'] == "15"
|
|
OR $_POST['algo'] == "16"
|
|
OR $_POST['algo'] == "16"
|
|
- )) {
|
|
|
|
|
|
+ ) {
|
|
|
|
+
|
|
|
|
+ if (is_int($_POST['keytag']) AND $_POST['keytag'] >= 1 AND $_POST['key'] <= 65535) {
|
|
|
|
+ if ($_POST['dt'] == "2" OR $_POST['dt'] == "4") {
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ exit("Incorrect value for dt");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ exit("Incorrect value for keytag");
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ } else {
|
|
|
|
+ exit("Incorrect value for algo");
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -78,5 +110,4 @@
|
|
|
|
|
|
?>
|
|
?>
|
|
|
|
|
|
- <br><a href="glue.php">Glue Record</a>
|
|
|
|
<?php include "../bottom.inc.php"; ?>
|
|
<?php include "../bottom.inc.php"; ?>
|