metasploitable3/chef/cookbooks/metasploitable/test/linux/drupal.rb

12 lines
555 B
Ruby
Raw Normal View History

2017-06-06 22:34:30 +02:00
# InSpec Testing for Drupal
describe command('curl http://localhost/drupal/') do
2017-08-09 18:10:49 +02:00
its('stdout') { should match /metasploitable3_logo\.png/ } # Make sure it has the icon
2017-06-06 22:34:30 +02:00
its('stdout') { should match /Metasploitable FAQs/ } # Make sure it has the title
its('stdout') { should match /What else is there to do here/ } # Make sure it has the content
end
describe command('mysql -h 127.0.0.1 --user="root" --password="sploitme" --execute="SHOW DATABASES LIKE \'drupal\'"') do
its('stdout') { should match /drupal/ } # Make sure the database exists
end