Add chatbot to Linux VM

This commit is contained in:
wchen-r7 2017-04-17 11:45:23 -05:00
parent 3002800d20
commit fe3cd99781
3 changed files with 42 additions and 0 deletions

1
Vagrantfile vendored
View File

@ -169,6 +169,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"
end
end
end

View File

@ -0,0 +1,41 @@
#
# Cookbook:: sinatra
# Recipe:: sinatra
#
# Copyright:: 2017, Rapid7, All Rights Reserved.
#
#
include_recipe 'metasploitable::sinatra'
package 'unzip'
package 'npm'
package 'bundler'
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