Sha256: b7e0ae53d5dbbce581bfbad6d17b3150726a5f8a55cfc5faacc054313ef127b9

Contents?: true

Size: 1.01 KB

Versions: 16

Compression:

Stored size: 1.01 KB

Contents

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

class TestScannerIisHeaders < Minitest::Test
  include TestBase

  def test_iis_basic_banner
    server = 'Microsoft-IIS/8.5'

    override_stdout
    Yawast::Scanner::Iis.check_banner server

    assert stdout_value.include?("IIS Version: #{server}"), "Unexpected banner: #{stdout_value}"

    restore_stdout
  end

  def test_asp_version
    headers = parse_headers_from_file File.dirname(__FILE__) + '/data/iis_server_header.txt'

    override_stdout
    Yawast::Scanner::Iis.check_asp_banner headers

    assert stdout_value.include?('ASP.NET Version'), 'ASP.NET Version warning not found.'

    restore_stdout
  end

  def test_mvc_version
    headers = parse_headers_from_file File.dirname(__FILE__) + '/data/iis_server_header.txt'

    override_stdout
    Yawast::Scanner::Iis.check_mvc_version headers

    assert stdout_value.include?('ASP.NET MVC Version'), 'ASP.NET MVC Version warning not found.'

    restore_stdout
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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