metasploitable3/chef/cookbooks/metasploitable/test/windows/jenkins.rb

25 lines
659 B
Ruby
Raw Normal View History

2017-07-06 05:25:40 +02:00
control "jenkins" do
title "Check jenkins"
desc "Check if jenkins is installed correctly. The setup script is available at /scripts/installs/setup_jenkins.bat"
describe file("C:\\Program Files\\jenkins") do
it { should exist }
end
describe file("C:\\Program Files\\jenkins\\jenkins.war") do
it { should exist }
end
describe file("C:\\Program Files\\jenkins\\jenkins.exe") do
it { should exist }
end
describe command("sc query jenkins") do
its('stdout') { should match ("STATE : 4 RUNNING") }
end
describe command("netstat -aob | findstr :8484") do
its('stdout') { should match ("LISTENING") }
end
end