metasploitable3/chef/cookbooks/metasploitable/test/windows/tomcat.rb
2017-07-07 17:50:21 +05:30

18 lines
506 B
Ruby

control "tomcat" do
title "Check tomcat installation"
desc "Check if tomcat is installed. Installation script available at /scripts/chocolatey_installs/tomcat.bat"
describe file('C:\\Program Files\\Apache Software Foundation\\tomcat') do
it { should exist }
end
describe command('sc query Tomcat8') do
its('stdout') { should match('STATE : 4 RUNNING') }
end
describe command('netstat -aob | findstr :8282') do
its('stdout') { should match ("LISTENING") }
end
end