File: apphp-calendar.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 (56 lines) | stat: -rw-r--r-- 2,177 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
##
# 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 "ApPHP-Calendar" do
author "Brendan Coles <bcoles@gmail.com>" # 2011-03-20
version "0.1"
description "The ApPHP Calendar (ApPHP CAL) is a powerful PHP calendar script that may be easily integrated and used with various PHP projects, such as schedulers, event processors etc. The calendar is very simple to install, implement and use."
website "http://www.apphp.com/php-calendar/"

# Google results as at 2011-03-20 #
# 29 for Sunday Monday Tuesday Wednesday Thursday Friday +Satarday inurl:action inurl:view_type

# Dorks #
dorks [
'Sunday Monday Tuesday Wednesday Thursday Friday "Satarday" inurl:action inurl:view_type'
]



# Matches #
matches [

# Version Detection # HTML Comment # This script was generated by
{ :version=>/<!-- This script was generated by ApPHP Calendar v\.([\d\.]+) \(http:\/\/www\.apphp\.com\) -->/ },

# Table column headings # How do I spell Saturday?
{ :text=>"<tr class='tr_days'><td class='th'>Sunday</td><td class='th'>Monday</td><td class='th'>Tuesday</td><td class='th'>Wednesday</td><td class='th'>Thursday</td><td class='th'>Friday</td><td class='th'>Satarday</td></tr>" },

]

# Aggressive #
def aggressive
	m=[]

	# Local File Path Detection # Confirm match # Find application base path
	if @body =~ /<!-- This script was generated by ApPHP Calendar v\.([\d\.]+) \(http:\/\/www\.apphp\.com\) -->/ and @base_uri.path =~ /\.php/

		# Open application base url + "?view_type[]"
		target_url = @base_uri.to_s.scan(/^([^\n]*\.php)/).to_s+"?view_type[]"
		status,url,ip,body,headers=open_target(target_url)

		# Extract local file path # PHP error
		m << { :filepath=>body.scan(/: The first argument should be either a string or an integer in (<b>)?([^\n^<]+)(<\/b>)? on line (<b>)?[\d]+(<\/b>)?/)[0][1] } if body =~ /: The first argument should be either a string or an integer in (<b>)?([^\n^<]+)(<\/b>)? on line (<b>)?[\d]+(<\/b>)?/

	end

	# Return aggressive matches
	m
end

end