Sha256: e8642d90c7038e1e4c979ec4413d7b3b32f9888ae71231b37e235476e9787eab

Contents?: true

Size: 730 Bytes

Versions: 13

Compression:

Stored size: 730 Bytes

Contents

require 'webrick'
require File.dirname(__FILE__) + '/../lib/yawast'
require File.dirname(__FILE__) + '/base'

class TestScannerApacheServerInfo < Minitest::Test
  include TestBase

  def test_server_info_present
    port = rand(60000) + 1024 # pick a random port number
    server = start_web_server File.dirname(__FILE__) + '/data/apache_server_info.txt', 'server-info', port

    override_stdout
    uri = Yawast::Commands::Utils.extract_uri(["http://localhost:#{port}"])

    Yawast::Shared::Http.setup nil, nil
    Yawast::Scanner::Apache.check_server_info uri

    assert stdout_value.include?('Apache Server Information page found'), 'Apache Server Info page warning not found'

    server.exit
    restore_stdout
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
yawast-0.6.0.beta2 test/test_scan_apache_server_info.rb
yawast-0.6.0.beta1 test/test_scan_apache_server_info.rb
yawast-0.5.2 test/test_scan_apache_server_info.rb
yawast-0.5.1 test/test_scan_apache_server_info.rb
yawast-0.5.1.beta1 test/test_scan_apache_server_info.rb
yawast-0.5.0 test/test_scan_apache_server_info.rb
yawast-0.5.0.beta8 test/test_scan_apache_server_info.rb
yawast-0.5.0.beta7 test/test_scan_apache_server_info.rb
yawast-0.5.0.beta6 test/test_scan_apache_server_info.rb
yawast-0.5.0.beta5 test/test_scan_apache_server_info.rb
yawast-0.5.0.beta4 test/test_scan_apache_server_info.rb
yawast-0.5.0.beta3 test/test_scan_apache_server_info.rb
yawast-0.5.0.beta2 test/test_scan_apache_server_info.rb