Skip to content

Commit

Permalink
add challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
GIC-de committed Nov 15, 2024
1 parent 95301e2 commit 20275ba
Show file tree
Hide file tree
Showing 6 changed files with 332 additions and 2 deletions.
13 changes: 12 additions & 1 deletion 03_routing/01_isis/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,18 @@
"sr-base": 100000,
"sr-range": 32000,
"sr-node-sid": 12,
"teardown-time": 30
"teardown-time": 30,
"external": {
"mrt-file": "isis_bbl2.mrt",
"auto-refresh": true,
"connections": [
{
"system-id": "1921.6822.2000.00",
"l1-metric": 1000,
"l2-metric": 2000
}
]
}
}
],
"streams": [
Expand Down
Binary file added 03_routing/01_isis/isis_bbl2.mrt
Binary file not shown.
109 changes: 109 additions & 0 deletions docs/_sources/challenge.rst.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,112 @@
Challenge
=========

We’ve integrated a small challenge into the BNG Blaster training,
hiding **5 secrets** at various points throughout the exercises.
All secrets follow the format ``SECRET_XX_XXXXXXXXXXXXXXX``.

Participants can uncover these secrets by using **RBFS CLI commands**.
The secrets are distributed across the training exercises, covering
both **access** and **routing** scenarios.

If you’re the first to discover all the secrets, notify one of the trainers
to claim a **special prize**. Happy hunting! 🚀


.. raw:: html

<style>
.input-field {
margin-bottom: 15px;
}
.input-field input {
width: 400px;
padding: 5px;
margin-right: 10px;
}
.input-field span {
font-weight: bold;
}
.verified {
background-color: #e0e0e0;
color: #000;
}
.success {
color: green;
font-size: 1.2em;
margin-top: 20px;
}
</style>

<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
<script>
const validatedFields = new Set();
function validate(inputId, hash) {
const inputElement = document.getElementById(inputId);
const statusElement = document.getElementById(`status-${inputId}`);
const value = inputElement.value;
// Compute SHA256 hash of input value
const computedHash = CryptoJS.SHA256(value).toString(CryptoJS.enc.Hex);
if (computedHash === hash) {
inputElement.classList.add("verified");
inputElement.disabled = true;
statusElement.textContent = "Verified";
statusElement.style.color = "green";
validatedFields.add(inputId);
// Check if all fields are verified
if (validatedFields.size === 5) {
document.getElementById("congratulations").style.display = "block";
}
} else {
statusElement.textContent = "Invalid";
statusElement.style.color = "red";
}
}
</script>
<div id="form-container">
<div class="input-field" id="field-01">
<label for="secret01">SECRET_01:</label>
<input type="text" id="secret01" />
<button onclick="validate('secret01', 'ebfa6663c8ed8e77d9f91aeb5337e812116a436f46e68e5ddaec994ee922b484')">Check</button>
<span id="status-secret01"></span>
</div>
<div class="input-field" id="field-02">
<label for="secret02">SECRET_02:</label>
<input type="text" id="secret02" />
<button onclick="validate('secret02', '35804f461f5992b46bf43d825327d654c018b8bf60ae1c49c3f33254df939564')">Check</button>
<span id="status-secret02"></span>
</div>
<div class="input-field" id="field-03">
<label for="secret03">SECRET_03:</label>
<input type="text" id="secret03" />
<button onclick="validate('secret03', '5f2b14a43a63bd23c0f2651b4558078f57591d4036a6c28fc489c599af347f2d')">Check</button>
<span id="status-secret03"></span>
</div>
<div class="input-field" id="field-04">
<label for="secret04">SECRET_04:</label>
<input type="text" id="secret04" />
<button onclick="validate('secret04', 'c7ee6e59a790a07a23638f7c7fa571d3420ae4136cb73b6ece20cab583fadf9e')">Check</button>
<span id="status-secret04"></span>
</div>
<div class="input-field" id="field-05">
<label for="secret05">SECRET_05:</label>
<input type="text" id="secret05" />
<button onclick="validate('secret05', '33a256a96b1d0f76402b9fa1c9f4f04bd6446650c193c9650705dde75664fa0c')">Check</button>
<span id="status-secret05"></span>
</div>
</div>
<div id="congratulations" class="success" style="display: none;">
Congratulations! All secrets are correct.
</div>


.. note::

The form requires the complete secret in the format ``SECRET_XX_XXXXXXXXXXXXXXX``.
Ensure there are no leading or trailing whitespaces.
101 changes: 101 additions & 0 deletions docs/challenge.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,107 @@

<section id="challenge">
<h1>Challenge<a class="headerlink" href="#challenge" title="Link to this heading"></a></h1>
<p>We’ve integrated a small challenge into the BNG Blaster training,
hiding <strong>5 secrets</strong> at various points throughout the exercises.
All secrets follow the format <code class="docutils literal notranslate"><span class="pre">SECRET_XX_XXXXXXXXXXXXXXX</span></code>.</p>
<p>Participants can uncover these secrets by using <strong>RBFS CLI commands</strong>.
The secrets are distributed across the training exercises, covering
both <strong>access</strong> and <strong>routing</strong> scenarios.</p>
<p>If you’re the first to discover all the secrets, notify one of the trainers
to claim a <strong>special prize</strong>. Happy hunting! 🚀</p>
<style>
.input-field {
margin-bottom: 15px;
}
.input-field input {
width: 400px;
padding: 5px;
margin-right: 10px;
}
.input-field span {
font-weight: bold;
}
.verified {
background-color: #e0e0e0;
color: #000;
}
.success {
color: green;
font-size: 1.2em;
margin-top: 20px;
}
</style>

<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
<script>
const validatedFields = new Set();

function validate(inputId, hash) {

const inputElement = document.getElementById(inputId);
const statusElement = document.getElementById(`status-${inputId}`);
const value = inputElement.value;

// Compute SHA256 hash of input value
const computedHash = CryptoJS.SHA256(value).toString(CryptoJS.enc.Hex);

if (computedHash === hash) {
inputElement.classList.add("verified");
inputElement.disabled = true;
statusElement.textContent = "Verified";
statusElement.style.color = "green";

validatedFields.add(inputId);

// Check if all fields are verified
if (validatedFields.size === 5) {
document.getElementById("congratulations").style.display = "block";
}
} else {
statusElement.textContent = "Invalid";
statusElement.style.color = "red";
}
}
</script>
<div id="form-container">
<div class="input-field" id="field-01">
<label for="secret01">SECRET_01:</label>
<input type="text" id="secret01" />
<button onclick="validate('secret01', 'ebfa6663c8ed8e77d9f91aeb5337e812116a436f46e68e5ddaec994ee922b484')">Check</button>
<span id="status-secret01"></span>
</div>
<div class="input-field" id="field-02">
<label for="secret02">SECRET_02:</label>
<input type="text" id="secret02" />
<button onclick="validate('secret02', '35804f461f5992b46bf43d825327d654c018b8bf60ae1c49c3f33254df939564')">Check</button>
<span id="status-secret02"></span>
</div>
<div class="input-field" id="field-03">
<label for="secret03">SECRET_03:</label>
<input type="text" id="secret03" />
<button onclick="validate('secret03', '5f2b14a43a63bd23c0f2651b4558078f57591d4036a6c28fc489c599af347f2d')">Check</button>
<span id="status-secret03"></span>
</div>
<div class="input-field" id="field-04">
<label for="secret04">SECRET_04:</label>
<input type="text" id="secret04" />
<button onclick="validate('secret04', 'c7ee6e59a790a07a23638f7c7fa571d3420ae4136cb73b6ece20cab583fadf9e')">Check</button>
<span id="status-secret04"></span>
</div>
<div class="input-field" id="field-05">
<label for="secret05">SECRET_05:</label>
<input type="text" id="secret05" />
<button onclick="validate('secret05', '33a256a96b1d0f76402b9fa1c9f4f04bd6446650c193c9650705dde75664fa0c')">Check</button>
<span id="status-secret05"></span>
</div>
</div>
<div id="congratulations" class="success" style="display: none;">
Congratulations! All secrets are correct.
</div><div class="admonition note">
<p class="admonition-title">Note</p>
<p>The form requires the complete secret in the format <code class="docutils literal notranslate"><span class="pre">SECRET_XX_XXXXXXXXXXXXXXX</span></code>.
Ensure there are no leading or trailing whitespaces.</p>
</div>
</section>


Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

109 changes: 109 additions & 0 deletions docsrc/sources/challenge.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,112 @@
Challenge
=========

We’ve integrated a small challenge into the BNG Blaster training,
hiding **5 secrets** at various points throughout the exercises.
All secrets follow the format ``SECRET_XX_XXXXXXXXXXXXXXX``.

Participants can uncover these secrets by using **RBFS CLI commands**.
The secrets are distributed across the training exercises, covering
both **access** and **routing** scenarios.

If you’re the first to discover all the secrets, notify one of the trainers
to claim a **special prize**. Happy hunting! 🚀


.. raw:: html

<style>
.input-field {
margin-bottom: 15px;
}
.input-field input {
width: 400px;
padding: 5px;
margin-right: 10px;
}
.input-field span {
font-weight: bold;
}
.verified {
background-color: #e0e0e0;
color: #000;
}
.success {
color: green;
font-size: 1.2em;
margin-top: 20px;
}
</style>

<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
<script>
const validatedFields = new Set();
function validate(inputId, hash) {
const inputElement = document.getElementById(inputId);
const statusElement = document.getElementById(`status-${inputId}`);
const value = inputElement.value;
// Compute SHA256 hash of input value
const computedHash = CryptoJS.SHA256(value).toString(CryptoJS.enc.Hex);
if (computedHash === hash) {
inputElement.classList.add("verified");
inputElement.disabled = true;
statusElement.textContent = "Verified";
statusElement.style.color = "green";
validatedFields.add(inputId);
// Check if all fields are verified
if (validatedFields.size === 5) {
document.getElementById("congratulations").style.display = "block";
}
} else {
statusElement.textContent = "Invalid";
statusElement.style.color = "red";
}
}
</script>
<div id="form-container">
<div class="input-field" id="field-01">
<label for="secret01">SECRET_01:</label>
<input type="text" id="secret01" />
<button onclick="validate('secret01', 'ebfa6663c8ed8e77d9f91aeb5337e812116a436f46e68e5ddaec994ee922b484')">Check</button>
<span id="status-secret01"></span>
</div>
<div class="input-field" id="field-02">
<label for="secret02">SECRET_02:</label>
<input type="text" id="secret02" />
<button onclick="validate('secret02', '35804f461f5992b46bf43d825327d654c018b8bf60ae1c49c3f33254df939564')">Check</button>
<span id="status-secret02"></span>
</div>
<div class="input-field" id="field-03">
<label for="secret03">SECRET_03:</label>
<input type="text" id="secret03" />
<button onclick="validate('secret03', '5f2b14a43a63bd23c0f2651b4558078f57591d4036a6c28fc489c599af347f2d')">Check</button>
<span id="status-secret03"></span>
</div>
<div class="input-field" id="field-04">
<label for="secret04">SECRET_04:</label>
<input type="text" id="secret04" />
<button onclick="validate('secret04', 'c7ee6e59a790a07a23638f7c7fa571d3420ae4136cb73b6ece20cab583fadf9e')">Check</button>
<span id="status-secret04"></span>
</div>
<div class="input-field" id="field-05">
<label for="secret05">SECRET_05:</label>
<input type="text" id="secret05" />
<button onclick="validate('secret05', '33a256a96b1d0f76402b9fa1c9f4f04bd6446650c193c9650705dde75664fa0c')">Check</button>
<span id="status-secret05"></span>
</div>
</div>
<div id="congratulations" class="success" style="display: none;">
Congratulations! All secrets are correct.
</div>


.. note::

The form requires the complete secret in the format ``SECRET_XX_XXXXXXXXXXXXXXX``.
Ensure there are no leading or trailing whitespaces.

0 comments on commit 20275ba

Please sign in to comment.