File: phpfox.rb

package info (click to toggle)
whatweb 0.4.9-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 21,188 kB
  • sloc: ruby: 33,652; sh: 614; makefile: 42
file content (58 lines) | stat: -rw-r--r-- 1,573 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
##
# This file is part of WhatWeb and may be subject to
# redistribution and commercial restrictions. Please see the WhatWeb
# web site for more information on licensing and terms of use.
# http://www.morningstarsecurity.com/research/whatweb
##
Plugin.define "phpFox" do
author "Brendan Coles <bcoles@gmail.com>" # 2011-04-21
version "0.1"
description "phpFox is a featured packed social networking solution that creates communities with features found on major social networking websites like Facebook and MySpace."
website "http://www.phpfox.com/"

# 336 for "Powered By phpFox Version"

# Dorks #
dorks [
'"Powered By phpFox Version"'
]



# Matches #
matches [

# Version Detection # Powered by text
{ :version=>/Powered By <a href="http:\/\/www\.phpfox\.com\/"[^>]*>phpFoX<\/a> Version ([\d\.]+)/ },
{ :version=>/<a href="http:\/\/www\.phpfox\.com\/"[^>]*>Powered by phpFoX Version ([\d\.]+)<\/a>/ },

]

# Passive #
def passive
	m=[]

	# Meta Generator (is base64 of "phpFox") or Meta Author
	if @body =~ /<meta name="generator" content="cGhwRm94" \/>/ or @body =~ /<meta name="author" content="phpFox" \/>/

		m << { :name=>"Meta Tags" }

		# Version Detection # Meta Version # base64 encoded
		if @body =~ /<meta name="version" content="([^"]+)" \/>/
			version=@body.scan(/<meta name="version" content="([^"]+)" \/>/).flatten.first
			m << { :version=>Base64.decode64(version).to_s }
		end
	end

	# phpfox(x)visit cookie
	if @headers["set-cookie"] =~ /phpfox[\d]visit=[\d]+;/
		m << { :name=>"phpfox(x)visit cookie" }
	end

	# Return passive matches
	m
end

end