lib/scanner/plugins/servers/iis.rb in yawast-0.7.0.beta1 vs lib/scanner/plugins/servers/iis.rb in yawast-0.7.0.beta2
- old
+ new
@@ -1,21 +1,23 @@
+# frozen_string_literal: true
+
module Yawast
module Scanner
module Plugins
module Servers
class Iis
def self.check_banner(banner)
- #don't bother if this doesn't include IIS
+ # don't bother if this doesn't include IIS
return unless banner.include? 'Microsoft-IIS/'
@iis = true
Yawast::Utilities.puts_warn "IIS Version: #{banner}"
puts ''
end
def self.check_all(uri, head)
- #run all the defined checks
+ # run all the defined checks
check_asp_banner(head)
check_mvc_version(head)
check_asp_net_debug(uri)
end
@@ -43,20 +45,18 @@
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
+ Yawast::Utilities.puts_vuln 'ASP.NET Debugging Enabled' if res.code == 200
Yawast::Shared::Output.log_value 'http', 'asp_net_debug', 'raw', res.body
Yawast::Shared::Output.log_value 'http', 'asp_net_debug', 'code', res.code
end
end
end
- #Custom class to allow using the DEBUG verb
+ # Custom class to allow using the DEBUG verb
class Debug < Net::HTTPRequest
METHOD = 'DEBUG'
REQUEST_HAS_BODY = false
RESPONSE_HAS_BODY = true
end