1## 2# This file is part of WhatWeb and may be subject to 3# redistribution and commercial restrictions. Please see the WhatWeb 4# web site for more information on licensing and terms of use. 5# http://www.morningstarsecurity.com/research/whatweb 6## 7Plugin.define "Icecast" do 8author "Brendan Coles <bcoles@gmail.com>" # 2011-08-07 9version "0.1" 10description "Icecast is a GPL streaming media server project that currently streams in MP3 format." 11website "http://www.icecast.org/" 12 13# ShodanHQ results as at 2011-08-07 # 14# 75 for icecast 15 16 17 18# Passive # 19def passive 20 m=[] 21 22 # Version Detection # HTTP Server Header 23 if @headers["server"] =~ /^Icecast ([^\s]+)/ 24 m << { :version=>"#{$1}" } 25 end 26 if @headers["server"] =~ /^icecast\/([^\s]+)/ 27 m << { :version=>"#{$1}" } 28 end 29 30 # icy-name Header 31 m << { :string=>@headers["icy-name"].to_s } unless @headers["icy-name"].nil? 32 33 # WWW-Authenticate Header 34 m << { :certainty=>75, :name=>"WWW-Authenticate Header" } if @headers["www-authenticate"] =~ /Basic realm="Icecast/ 35 36 # Return passive matches 37 m 38end 39end 40 41