Class: Yawast::Scanner::Iis
- Inherits:
-
Object
- Object
- Yawast::Scanner::Iis
- Defined in:
- lib/scanner/iis.rb
Class Method Summary collapse
- .check_all(uri, head) ⇒ Object
- .check_asp_banner(head) ⇒ Object
- .check_asp_net_debug(uri) ⇒ Object
- .check_banner(banner) ⇒ Object
- .check_mvc_version(head) ⇒ Object
Class Method Details
.check_all(uri, head) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/scanner/iis.rb', line 13 def self.check_all(uri, head) return if !@iis #run all the defined checks (head) check_mvc_version(head) check_asp_net_debug(uri) end |
.check_asp_banner(head) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/scanner/iis.rb', line 22 def self.(head) head.each do |k, v| if k.downcase == 'x-aspnet-version' Yawast::Utilities.puts_warn "ASP.NET Version: #{v}" puts '' end end end |
.check_asp_net_debug(uri) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/scanner/iis.rb', line 40 def self.check_asp_net_debug(uri) begin req = Yawast::Shared::Http.get_http(uri) req.use_ssl = uri.scheme == 'https' headers = Yawast::Shared::Http.get_headers headers['Command'] = 'stop-debug' headers['Accept'] = '*/*' res = req.request(Debug.new('/', headers)) if res.code == 200 Yawast::Utilities.puts_vuln 'ASP.NET Debugging Enabled' end end end |