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 59 60 61 62 63 64 65 66
|
##
# 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 "QCubed-Development-Framework" do
author "Brendan Coles <bcoles@gmail.com>" # 2011-03-14
version "0.1"
description "The Qcodo Development Framework is an open-source PHP framework that focuses on freeing developers from unnecessary tedious, mundane coding."
website "http://www.qcodo.com/"
# Google results as at 2011-03-14 #
# 11 for "qcodo/_devtools/codegen.php" intitle:"Development Framework - Start Page"
# 100 results for intitle:"PHP Error" "Qcubed Version" "PHP Version"
# Dorks #
dorks [
'"qcodo/_devtools/codegen.php" intitle:"Development Framework - Start Page"',
'intitle:"PHP Error" "Qcubed Version" "PHP Version"'
]
# Matches #
matches [
# Version Detection
{ :version=>/<div id="codeVersion">QCubed Development Framework ([^\(]+) \([^\)]+\)<\/div>/ },
{ :version=>/<b>PHP Version:<\/b> [^;]+; <b>Zend Engine Version:<\/b> [^;]+; <b>QCubed Version:<\/b> ([^\(]+) \([^\(]+\)<br \/>/ },
]
# Passive #
def passive
m=[]
# Detect Title
if @body =~ /<title>QCubed Development Framework - Start Page<\/title>/
# Version Detection
m << { :version=>@body.scan(/<div class="title_action">QCubed Development Framework ([^\(]+) \([^\)]+\)<\/div>/) } if @body =~ /<div class="title_action">QCubed Development Framework ([^\(]+) \([^\)]+\)<\/div>/
# Extract DB Credentials
if @body =~ /<li>QApplication::\$ServerAddress = "([^"]+)"<\/li><li>QApplication::\$Database\[1\] = array \([\r\n] 'adapter' => '([^']+)',[\r\n] 'server' => '([^']+)',[\r\n] 'port' => '?([^'^,]+)'?,[\r\n] 'database' => '([^']+)',[\r\n] 'username' => '([^']+)',[\r\n] 'password' => '([^']+)',[\r\n] 'profiling' => (false|true),/
db=@body.scan(/<li>QApplication::\$ServerAddress = "([^"]+)"<\/li><li>QApplication::\$Database\[1\] = array \([\r\n] 'adapter' => '([^']+)',[\r\n] 'server' => '([^']+)',[\r\n] 'port' => '?([^'^,]+)'?,[\r\n] 'database' => '([^']+)',[\r\n] 'username' => '([^']+)',[\r\n] 'password' => '([^']+)',[\r\n] 'profiling' => (false|true),/)
# Database
m << { :string=>"Database:"+db[0][4] }
# Account
m << { :account=>db[0][5]+":"+db[0][6]+"@"+db[0][2]+":"+db[0][3] }
end
end
# Return passive matches
m
end
end
|