services/parameterised_webiste: Business facts can be blank. no manager / employee data will hide the contacts page.

This commit is contained in:
thomashaw
2017-05-14 23:04:47 +01:00
parent 0e1df49723
commit 8d426c6580
4 changed files with 49 additions and 12 deletions

View File

@@ -5,7 +5,8 @@ class parameterised_website::install {
# Parse out parameters
$business_name = $secgen_parameters['business_name'][0]
$business_motto = $secgen_parameters['business_motto'][0]
$manager_profile = parsejson($secgen_parameters['manager_profile'][0])
$manager_profile = $secgen_parameters['manager_profile'][0]
if $manager_profile != '' { $manager_profile = parsejson($manager_profile) }
$business_address = $secgen_parameters['business_address'][0]
$office_telephone = $secgen_parameters['office_telephone'][0]
$office_email = $secgen_parameters['office_email'][0]
@@ -54,10 +55,12 @@ class parameterised_website::install {
content => template($index_template),
}
# Apply contact page template
file { "$docroot/contact.html":
ensure => file,
content => template('parameterised_website/contact.html.erb'),
if $manager_profile != '' or $business_address != '' or $employees[0] != '' {
# Apply contact page template
file { "$docroot/contact.html":
ensure => file,
content => template('parameterised_website/contact.html.erb'),
}
}
# Create visible tab html files

View File

@@ -11,7 +11,7 @@
<p>Find the Acceptable Use Policy <a href="acceptable_use_policy.html">here</a>.</p>
<% end -%>
<% # Externally input / default style -%>
<% else -%>
<% elsif @manager_profile != '' or @employees[0] != '' or @business_address != ''-%>
<h1><%= @business_name %></h1>
<h2><%= @product_name %></h2>
<p><%= @main_page_paragraph_content.join %></p>

View File

@@ -3,7 +3,9 @@
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">Home</a></li>
<% if @manager_profile != '' or @employees[0] != '' or @business_address != '' -%>
<li><a href="contact.html">Contact Us</a></li>
<% end -%>
<% if @security_audit -%>
<li><a href="security_audit_remit.html">Security Audit Remit</a></li>
<% end -%>

View File

@@ -19,7 +19,7 @@
</input>
<input into="paragraphs" unique_module_list="unique_encoders">
<value>Hunt down the flags. There are more challenges than meets the eye.</value>
<value>There are vulnerabilities on the server. Try scanning the network.</value>
<value>There are vulnerabilities on the server.</value>
<value>Good luck, have fun!</value>
</input>
</generator>
@@ -108,6 +108,38 @@
<generator type="image_challenge_generator" />
<generator type="image_challenge_generator" />
</input>
<!-- No business facts. -->
<input into="business_name">
<value></value>
</input>
<input into="business_motto">
<value></value>
</input>
<input into="manager_profile">
<value></value>
</input>
<input into="business_address">
<value></value>
</input>
<input into="office_telephone">
<value></value>
</input>
<input into="office_email">
<value></value>
</input>
<input into="industry">
<value></value>
</input>
<input into="employees">
<value></value>
</input>
<input into="product_name">
<value></value>
</input>
<input into="main_page_paragraph_content">
<value></value>
</input>
</service>
<vulnerability read_fact="strings_to_leak" access="remote" >
@@ -117,11 +149,11 @@
</vulnerability>
<network module_path=".*private_network_1"/>
<!--<build type="cleanup">-->
<!--<input into="root_password">-->
<!--<generator type="strong_password_generator"/>-->
<!--</input>-->
<!--</build>-->
<build type="cleanup">
<input into="root_password">
<generator type="strong_password_generator"/>
</input>
</build>
</system>
</scenario>