mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-06-29 16:25:46 +02:00
Hide 7 of diamonds in docker container
This commit is contained in:
parent
d088960490
commit
268537fa5d
|
@ -4,6 +4,9 @@
|
||||||
#
|
#
|
||||||
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
||||||
|
|
||||||
|
include_recipe 'metasploitable::knockd'
|
||||||
|
include_recipe 'metasploitable::docker'
|
||||||
|
|
||||||
directory '/opt/knock_knock' do
|
directory '/opt/knock_knock' do
|
||||||
mode 0700
|
mode 0700
|
||||||
end
|
end
|
||||||
|
@ -26,7 +29,7 @@ directory '/home/artoo_detoo/music' do
|
||||||
mode 700
|
mode 700
|
||||||
end
|
end
|
||||||
|
|
||||||
cookbook_file '/home/artoo_detoo//music/10_of_clubs.wav' do
|
cookbook_file '/home/artoo_detoo/music/10_of_clubs.wav' do
|
||||||
source 'flags/10_of_clubs.wav'
|
source 'flags/10_of_clubs.wav'
|
||||||
mode 400
|
mode 400
|
||||||
end
|
end
|
||||||
|
@ -44,3 +47,29 @@ bash "load 8 of hearts into DB" do
|
||||||
EOH
|
EOH
|
||||||
not_if "mysql -h 127.0.0.1 --user=\"root\" --password=\"sploitme\" --execute=\"SHOW DATABASES LIKE 'super_secret_db'\" | grep -c drupal"
|
not_if "mysql -h 127.0.0.1 --user=\"root\" --password=\"sploitme\" --execute=\"SHOW DATABASES LIKE 'super_secret_db'\" | grep -c drupal"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
directory '/opt/docker' do
|
||||||
|
mode 700
|
||||||
|
end
|
||||||
|
|
||||||
|
cookbook_file '/opt/docker/Dockerfile' do
|
||||||
|
source '/flags/Dockerfile'
|
||||||
|
mode 700
|
||||||
|
end
|
||||||
|
|
||||||
|
cookbook_file '/opt/docker/7_of_diamonds.zip' do
|
||||||
|
source '/flags/7_of_diamonds.zip'
|
||||||
|
mode 700
|
||||||
|
end
|
||||||
|
|
||||||
|
bash 'build docker image for 7 of diamonds' do
|
||||||
|
code <<-EOH
|
||||||
|
cd /opt/docker
|
||||||
|
docker build -t "7_of_diamonds" .
|
||||||
|
docker run -dit --restart always 7_of_diamonds
|
||||||
|
EOH
|
||||||
|
end
|
||||||
|
|
||||||
|
file '/opt/docker/7_of_diamonds.zip' do
|
||||||
|
action :delete
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user