From c7047e4e125ff288e3ff91086bb024dfc58a8834 Mon Sep 17 00:00:00 2001 From: thomashaw Date: Mon, 1 May 2017 13:21:25 +0100 Subject: [PATCH] Parameterised 'Start here!' tab --- .../manifests/install.pp | 12 +++++---- .../templates/subtemplates/tab_panel.html.erb | 14 ++++++----- scenarios/ctf/edge_hill_scenario.xml | 25 ++++++++++++++++++- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/modules/vulnerabilities/unix/webapp/parameterised_website/manifests/install.pp b/modules/vulnerabilities/unix/webapp/parameterised_website/manifests/install.pp index fd6ac6e7c..3b103c71c 100644 --- a/modules/vulnerabilities/unix/webapp/parameterised_website/manifests/install.pp +++ b/modules/vulnerabilities/unix/webapp/parameterised_website/manifests/install.pp @@ -62,11 +62,13 @@ class parameterised_website::install { # Create visible tab html files $visible_tabs.each |$counter, $visible_tab| { - $n = $counter + 1 + if $counter != 0 { + $n = $counter - file { "$docroot/tab_$n.html": - ensure => file, - content => $visible_tab, + file { "$docroot/tab_$n.html": + ensure => file, + content => $visible_tab, + } } } @@ -75,7 +77,7 @@ class parameterised_website::install { if $counter == 0 { $n = 0 } else { - $n = $counter + $visible_tabs.length + $n = $counter + $visible_tabs.length - 1 # minus one accounts for the information tab } file { "$docroot/tab_$n.html": diff --git a/modules/vulnerabilities/unix/webapp/parameterised_website/templates/subtemplates/tab_panel.html.erb b/modules/vulnerabilities/unix/webapp/parameterised_website/templates/subtemplates/tab_panel.html.erb index c0774b5de..442982549 100644 --- a/modules/vulnerabilities/unix/webapp/parameterised_website/templates/subtemplates/tab_panel.html.erb +++ b/modules/vulnerabilities/unix/webapp/parameterised_website/templates/subtemplates/tab_panel.html.erb @@ -1,12 +1,14 @@
-
- +
+ <%= @visible_tabs[0] %>
\ No newline at end of file diff --git a/scenarios/ctf/edge_hill_scenario.xml b/scenarios/ctf/edge_hill_scenario.xml index 447d9ea33..33c85733b 100644 --- a/scenarios/ctf/edge_hill_scenario.xml +++ b/scenarios/ctf/edge_hill_scenario.xml @@ -6,13 +6,22 @@ - decode_me + nw_cyber_games + + + Welcome to the North West Cyber Games! + + + Hunt down the flags. Good luck, have fun! + + + Challenge 1 @@ -115,6 +124,20 @@ + + + + + + + + + + + + + +