lib/whatweb/plugins/apache-tomcat.rb in simple_whatweb-0.2.1 vs lib/whatweb/plugins/apache-tomcat.rb in simple_whatweb-0.3.0
- old
+ new
@@ -46,12 +46,10 @@
new_url = "#{target.uri.scheme}://#{target.uri.host}:#{target.uri.port}/#{randstr}"
info = []
new_target = WhatWeb::Target.new(new_url)
if new_target.status == 404
v = new_target.body.scan(/Apache Tomcat\/([456]\.\d+\.\d+)/)[0]
- unless v.nil?
- info << { name: "Tomcat version", certainty: 100, version: v }
- end
+ info << { name: "Tomcat version", certainty: 100, version: v } if v
end
info
end
def aggressive(target)