mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-07-05 03:05:51 +02:00
commit
31af07a5d1
1
Vagrantfile
vendored
1
Vagrantfile
vendored
|
@ -171,6 +171,7 @@ Vagrant.configure("2") do |config|
|
|||
chef.add_recipe "metasploitable::docker"
|
||||
chef.add_recipe "metasploitable::samba"
|
||||
chef.add_recipe "metasploitable::unrealircd"
|
||||
chef.add_recipe "metasploitable::chatbot"
|
||||
chef.add_recipe "metasploitable::cups"
|
||||
chef.add_recipe "metasploitable::readme_app"
|
||||
chef.add_recipe "metasploitable::payroll_app"
|
||||
|
|
BIN
chef/cookbooks/metasploitable/files/chatbot/chatbot.zip
Normal file
BIN
chef/cookbooks/metasploitable/files/chatbot/chatbot.zip
Normal file
Binary file not shown.
45
chef/cookbooks/metasploitable/recipes/chatbot.rb
Normal file
45
chef/cookbooks/metasploitable/recipes/chatbot.rb
Normal file
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# Cookbook:: metasploitable
|
||||
# Recipe:: chatbot
|
||||
#
|
||||
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
||||
#
|
||||
#
|
||||
|
||||
include_recipe 'metasploitable::ruby23'
|
||||
include_recipe 'metasploitable::nodejs'
|
||||
|
||||
package 'unzip'
|
||||
|
||||
bash "Install dependencies" do
|
||||
code <<-EOH
|
||||
npm install express
|
||||
npm install cors
|
||||
EOH
|
||||
end
|
||||
|
||||
cookbook_file '/tmp/chatbot.zip' do
|
||||
source 'chatbot/chatbot.zip'
|
||||
mode '0777'
|
||||
end
|
||||
|
||||
execute 'unzip chatbot' do
|
||||
command 'unzip /tmp/chatbot.zip -d /opt'
|
||||
end
|
||||
|
||||
execute 'chown chatbot' do
|
||||
command 'chown -R vagrant:vagrant /opt/chatbot'
|
||||
end
|
||||
|
||||
execute 'chmod chatbot' do
|
||||
command 'chmod -R 777 /opt/chatbot'
|
||||
end
|
||||
|
||||
execute 'install chatbot' do
|
||||
command '/opt/chatbot/install.sh'
|
||||
end
|
||||
|
||||
service 'chatbot' do
|
||||
supports restart: false, start: true, reload: false, status: false
|
||||
action [:enable, :start]
|
||||
end
|
17
chef/cookbooks/metasploitable/recipes/nodejs.rb
Normal file
17
chef/cookbooks/metasploitable/recipes/nodejs.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
#
|
||||
# Cookbook:: metasploitable
|
||||
# Recipe:: nodejs
|
||||
#
|
||||
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
||||
#
|
||||
#
|
||||
|
||||
execute 'add nodejs 4 repository' do
|
||||
command 'curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -'
|
||||
end
|
||||
|
||||
execute "apt-get update" do
|
||||
command "apt-get update"
|
||||
end
|
||||
|
||||
package 'nodejs'
|
|
@ -7,9 +7,9 @@
|
|||
#
|
||||
|
||||
include_recipe 'metasploitable::ruby23'
|
||||
include_recipe 'metasploitable::nodejs'
|
||||
|
||||
package 'git'
|
||||
package 'nodejs'
|
||||
|
||||
directory '/opt/readme_app' do
|
||||
mode '0777'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Cookbook:: sinatra
|
||||
# Cookbook:: metasploitable
|
||||
# Recipe:: sinatra
|
||||
#
|
||||
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
||||
|
|
Loading…
Reference in New Issue
Block a user