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##
7# Version 0.2 # 2011-01-23 #
8# Updated regex
9##
10Plugin.define "ChinaCache" do
11author "Brendan Coles <bcoles@gmail.com>" # 2010-10-30
12version "0.2"
13description "ChinaCache is a leading content distribution network (CDN) service provider in China. This header, vehicolated through squid, not only tells the world where the content is coming from, it also brings some (obscure) info with it. What is sure is that there is no open standard on how to use this server header field. Probably it is there only for debugging purposes by the employees of ChinaCache."
14website "http://www.chinacache.com/"
15
16# ShodanHQ results as at 2010-10-30 #
17# About 958 results for "Powered-By-ChinaCache"
18
19
20
21# Passive #
22def passive
23	m=[]
24
25	# powered-by-chinacache HTTP Header
26	unless @headers["powered-by-chinacache"].nil?
27		m << { :string=>@headers["powered-by-chinacache"].to_s }
28	end
29
30	# Return passive matches
31	m
32
33end
34
35end
36
37