"Fossies" - the Fresh Open Source Software Archive 
Member "WhatWeb-0.5.5/plugins/joomla.rb" (15 Jan 2021, 21795 Bytes) of package /linux/www/WhatWeb-0.5.5.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "joomla.rb":
0.5.4_vs_0.5.5.
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 # https://www.morningstarsecurity.com/research/whatweb
6 ##
7 Plugin.define do
8 name "Joomla"
9 authors [
10 "Andrew Horton",
11 # v0.4 # removed :probability & :name.
12 # v0.5 # uses :module instead of :string, changed the 3rd regexp from 75 certainty to 25..
13 # v0.6 # added seconds since epoch match from the mambo plugin.
14 "Brendan Coles <bcoles@gmail.com>", # v0.7 # 2011-03-19 # Added aggressive match for /administrator/. Updated matches to remove false positives.
15 # Andrew Horton # v0.8 # Added aggressive match for /administrator/. Use match now
16 "@anozoozian", # v0.9 # 2016-12-16 # Updated aggressive version detection for Joomla 3.1.4 -> 3.6.4.
17 "Juanan Pereira", # v1.0 Added aggressive version detection for /administrator/manifests/files/joomla.xml
18 ]
19 version "1.0"
20 description "Opensource CMS written in PHP. Aggressive version detection compares just 5 files, checks for version 1.0.0 up to 3.6.4"
21 website "http://joomla.org"
22
23 # Google results as at 2011-03-19 #
24 # 602 for "powered by joomla" inurl:option=com_content
25 # 537 for "powered by joomla"
26
27 # Dorks #
28 dorks [
29 '"powered by joomla" inurl:option=com_content'
30 ]
31
32 # Matches #
33 matches [
34 { :url=>'/administrator/manifests/files/joomla.xml', :version=>/<version>(.*?)<\/version>/ } ,
35 { :version=>"1.0", :regexp=>/<meta name="Generator" content="Joomla! - Copyright \(C\) 200[0-9] - 200[0-9] Open Source Matters. All rights reserved." \/>/ },
36 { :version=>/<meta name="generator" content="Joomla! (\d\.\d) - Open Source Content Management" \/>/ },
37 { :text=>'Powered by <a href="http://www.joomla.org">Joomla!</a>.' },
38
39 { :url=>'/administrator/', :regexp=>/<div id="joomla"><img src="[^"]*\/images\/header_text.png" alt="Joomla! Logo"/ , :name=>'admin page'} #"
40 ]
41
42 # Passive #
43 passive do
44 m=[]
45
46 # mosvisitor cookie # Also used by mambo
47 m << { :certainty=>75, :name=>"mosvisitor cookie" } if @headers["set-cookie"] =~ /mosvisitor=[0-9]+/
48
49 # P3P Privacy Headers # Also used by phpcake
50 m << { :name=>"P3P Privacy Headers", :certainty=>25 } if @headers["p3p"] == 'CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'
51
52 # HTML Comment # seconds since epoch # Also used by mambo
53 if @body =~ /<\/html>.*(\n)*<!-- [0-9]+.*-->(\n)*\z/ and @body !~ /mambo/i
54 m << {:name=>"seconds since epoch in html comment after </html>",:certainty=>25}
55 end
56
57
58 # Module Detection # Doesn't work in SEO mode # Also used by mambo
59 if @body =~ /<a href="[^"]*index.php\?option=(com_[^&^"]+)/
60
61 # Absolute URL
62 m << { :certainty=>75, :module=>@body.scan(/<a href="https?:\/\/#{Regexp.escape(@base_uri.host)}[^"]*index.php\?option=(com_[^&^"]+)/) } if @body =~ /<a href="https?:\/\/#{Regexp.escape(@base_uri.host)}[^"]*index.php\?option=(com_[^&^"]+)/
63
64 # Relative URL
65 m << { :certainty=>75, :module=>@body.scan(/<a href="[^"^:]*index.php\?option=(com_[^&^"]+)/) } if @body =~ /<a href="[^"^:]*index.php\?option=(com_[^&^"]+)/
66
67 end
68
69
70 # Return passive matches
71 m
72 end
73
74 # Aggressive #
75 aggressive do
76 m=[]
77
78 versions = Hash["1.0.0" =>
79 [["mambots/editors/tinymce.xml",
80 "edefdf03134820ce7c70c5259efb9933"]],
81 "1.0.1" =>
82 [["mambots/editors/tinymce.xml",
83 "413b5585e4a4eae68c1a84d46e6df39b"]],
84 "1.0.2" =>
85 [["htaccess.txt",
86 "afb2e4330fdd3ce1fc3a177c699500c9"]],
87 "1.0.3" =>
88 [["htaccess.txt",
89 "e8225db1325ec0881f6c35ba1d8cf3d3"]],
90 "1.0.4" =>
91 [["administrator/images/install.png",
92 "98781b97253bf4f08717dcace0f18f5e"]],
93 "1.0.5" =>
94 [["mambots/editors/tinymce.xml",
95 "2130a77181699f126f6b7f90d062ff1c"],
96 ["htaccess.txt",
97 "5e5b5d8a7eead9c108bb9f20731c545f"]], #
98 # 1.0.6 and 1.0.7 are not distinguishable from world readable files
99 "1.0.6" =>
100 [["administrator/images/install.png",
101 "49fad9c07d820e7a4c9a1ce181a1facd"],
102 ["mambots/editors/tinymce.xml",
103 "58d5b50f7a96582c4d3b02961dd307e4"],
104 ["htaccess.txt",
105 "e4ddb334509c5c68c4f79e98e9b74730"]],
106 "1.0.7" =>
107 [["administrator/images/install.png",
108 "49fad9c07d820e7a4c9a1ce181a1facd"],
109 ["mambots/editors/tinymce.xml",
110 "58d5b50f7a96582c4d3b02961dd307e4"],
111 ["htaccess.txt",
112 "e4ddb334509c5c68c4f79e98e9b74730"]],
113
114 "1.0.8" =>
115 [["htaccess.txt",
116 "9a31c03b78bc47c924f6cf70ca60aa5f"],
117 ["mambots/editors/tinymce.xml",
118 "083dd5a6b123ad25c9f69a9eef0cf2df"]],
119 "1.0.9" =>
120 [["htaccess.txt",
121 "9a31c03b78bc47c924f6cf70ca60aa5f"],
122 ["mambots/editors/tinymce.xml",
123 "b13ea8e0725f7c2053667304dea193bf"]],
124 "1.0.10" =>
125 [["htaccess.txt",
126 "f363429837881dc1ec847c0f45729b71"]],
127 "1.0.11" =>
128 [["htaccess.txt",
129 "a5e00265b1f46438dbe005fe052edd99"]],
130 "1.0.12" =>
131 [["htaccess.txt",
132 "2dc67316e261bb45d11262e78942feeb"]],
133 "1.0.13" =>
134 [["modules/mod_wrapper.xml",
135 "4cbbbc7782a23a811a462a62a699be2d"]],
136 "1.0.14-rc1" =>
137 [["modules/mod_wrapper.xml",
138 "1ecb889511e8b878b42e8cef476b5d3b"]],
139 # 1.0.14 and 1.0.15 are not distinguishable from world readable files
140 "1.0.14" =>
141 [["htaccess.txt",
142 "aacd62b8919a1081ab954d7062affb0f"],
143 ["administrator/modules/mod_components.xml",
144 "0b5554f8f2da6df6b7d979d0042c7fbf"],
145 ["mambots/editors/tinymce.xml",
146 "679c382f2ae3f8fb4056f09bd0014e89"]],
147 "1.0.15" =>
148 [["htaccess.txt",
149 "aacd62b8919a1081ab954d7062affb0f"],
150 ["administrator/modules/mod_components.xml",
151 "0b5554f8f2da6df6b7d979d0042c7fbf"],
152 ["mambots/editors/tinymce.xml",
153 "679c382f2ae3f8fb4056f09bd0014e89"]],
154
155 "1.5.0" =>
156 [["language/en-GB/en-GB.ini",
157 "903fb75f4369d78373b7b00db1c86c20"]],
158 "1.5.1" =>
159 [["language/en-GB/en-GB.ini",
160 "be9408d25f37e91111caefca9b07f7d9"]],
161 "1.5.2" =>
162 [["language/en-GB/en-GB.ini",
163 "630486389fb8b81bd17417acdf82534d"]],
164 "1.5.3" =>
165 [["language/en-GB/en-GB.ini",
166 "7ce67c338528faac3870827d439daa8e"]],
167 "1.5.4" =>
168 [["administrator/language/en-GB/en-GB.ini",
169 "d7961bdd2528bf4bfc505b1d44920edd"],
170 ["language/en-GB/en-GB.ini",
171 "18bcc3be286f5c9ee03b211c3fcc02f6"]],
172 "1.5.5" =>
173 [["administrator/language/en-GB/en-GB.ini",
174 "36a0b9af0fb86d84f51d2cfeef7577e8"],
175 ["components/com_content/views/section/tmpl/blog.xml",
176 "1c7734da60b28b44d7cb64ca5438c385"]],
177 "1.5.6" =>
178 [["administrator/language/en-GB/en-GB.ini",
179 "36a0b9af0fb86d84f51d2cfeef7577e8"],
180 ["components/com_content/views/section/tmpl/blog.xml",
181 "1c7734da60b28b44d7cb64ca5438c385"]],
182 "1.5.7" =>
183 [["administrator/language/en-GB/en-GB.ini",
184 "36a0b9af0fb86d84f51d2cfeef7577e8"],
185 ["components/com_content/views/section/tmpl/blog.xml",
186 "898b11ae86668024a3c4d64a52f86173"]],
187 "1.5.8" =>
188 [["language/en-GB/en-GB.ini",
189 "fb5fcb1739656a7056573a1f04feb294"]],
190 "1.5.9" =>
191 [["administrator/language/en-GB/en-GB.ini",
192 "5516cf074a67bb54bbdb4fd9c340574d"]],
193 "1.5.10" =>
194 [["administrator/language/en-GB/en-GB.ini",
195 "a8b4a2477bc332f9039828c45aea92c2"]],
196 "1.5.11" =>
197 [["language/en-GB/en-GB.ini",
198 "75586cfdf36020bdbfe66bd90072fb07"],
199 ["administrator/language/en-GB/en-GB.ini",
200 "c42788d652d97e2a103a7dcd3d507789"]],
201 "1.5.12" =>
202 [["plugins/editors/tinymce.xml",
203 "88c25322c0e878b6944cf9ea462c5071"]],
204 # 1.5.13 and 1.5.14 are not distinguishable from world readable files
205 "1.5.13" =>
206 [["plugins/editors/tinymce.xml",
207 "e6537f60fc9e6a04eda14d55f852a9d8"]],
208 "1.5.14" =>
209 [["plugins/editors/tinymce.xml",
210 "e6537f60fc9e6a04eda14d55f852a9d8"]],
211 "1.5.15" =>
212 [["language/en-GB/en-GB.ini",
213 "449d7bb356fcefa1343d72d203297438"]],
214 "1.5.16" =>
215 [["administrator/help/helpsites-15.xml",
216 "ab1adf8a00a59bbc5cda0de617de8d48"]],
217 "1.5.17" =>
218 [["language/en-GB/en-GB.ini",
219 "685fdb13400fb459490c72f829427685"]],
220 "1.5.18" =>
221 [["administrator/help/helpsites-15.xml",
222 "0fbcf1a962b227a6626be84cc4a9ebca"],
223 ["components/com_contact/metadata.xml",
224 "9ea9550db4b1ae1eb7af7d7770301d16"]],
225 # 1.5.19 and 1.5.20, 1.5.21, 1.5.22 are not distinguishable from world readable files
226 "1.5.19" =>
227 [["htaccess.txt",
228 "d83c45a3aca4c5e7c8d55def31b6b85d"],
229 ["plugins/system/mtupgrade.xml",
230 "5be607638c998cd461f40551223e1dd0"]],
231 "1.5.20" =>
232 [["htaccess.txt",
233 "d83c45a3aca4c5e7c8d55def31b6b85d"],
234 ["plugins/system/mtupgrade.xml",
235 "5be607638c998cd461f40551223e1dd0"]],
236 "1.5.21" =>
237 [["htaccess.txt",
238 "d83c45a3aca4c5e7c8d55def31b6b85d"],
239 ["plugins/system/mtupgrade.xml",
240 "5be607638c998cd461f40551223e1dd0"]],
241 "1.5.22" =>
242 [["htaccess.txt",
243 "d83c45a3aca4c5e7c8d55def31b6b85d"],
244 ["plugins/system/mtupgrade.xml",
245 "5be607638c998cd461f40551223e1dd0"]],
246 # 1.5.23 and 1.5.24 1.5.25, 1.5.26 are not distinguishable from world readable files
247 "1.5.23" =>
248 [["htaccess.txt",
249 "479cce960362b0e17ca26f2c13790087"],
250 ["components/com_contact/metadata.xml",
251 "24095af7fbd32685fe2c817544df5117"]],
252 "1.5.24" =>
253 [["htaccess.txt",
254 "479cce960362b0e17ca26f2c13790087"],
255 ["components/com_contact/metadata.xml",
256 "24095af7fbd32685fe2c817544df5117"]],
257 "1.5.25" =>
258 [["htaccess.txt",
259 "479cce960362b0e17ca26f2c13790087"],
260 ["components/com_contact/metadata.xml",
261 "24095af7fbd32685fe2c817544df5117"]],
262 "1.5.26" =>
263 [["htaccess.txt",
264 "479cce960362b0e17ca26f2c13790087"],
265 ["components/com_contact/metadata.xml",
266 "24095af7fbd32685fe2c817544df5117"]],
267
268 "1.6.0" =>
269 [["joomla.xml",
270 "f1c5fb5aa195e187b7847ddf3b3c492c"]],
271 "1.6.1" =>
272 [["joomla.xml",
273 "57612b39ccefb55c4c4b8f760c4eefaf"]],
274 "1.6.2" =>
275 [["joomla.xml",
276 "bef35a71e39d7a4a7134d9ceb4846fa7"]],
277 "1.6.3" =>
278 [["joomla.xml",
279 "309dbf4fc5906d0dbc74f7b7433ac2b6"]],
280 "1.6.4" =>
281 [["joomla.xml",
282 "08462ef0426bbd37916ea29f0234dc24"]],
283 "1.6.5" =>
284 [["joomla.xml",
285 "37a8957ea7778332251dae4b438f257e"]],
286 "1.6.6" =>
287 [["joomla.xml",
288 "936af8e7615bbc1aecd0181773141f9e"]],
289
290 "1.7.0" =>
291 [["joomla.xml",
292 "b575e7d089b8bfea19bcc9c7393ccfa1"]],
293 "1.7.1" =>
294 [["joomla.xml",
295 "a76dfb3f5252ec3f07a118e02d83c2ec"]],
296 "1.7.2" =>
297 [["joomla.xml",
298 "5da18d3a7f59874caaa7367238a5bdf2"]],
299 "1.7.3" =>
300 [["joomla.xml",
301 "efa8cae1e299bb85f00bb74cc040a350"]],
302 "1.7.4" =>
303 [["joomla.xml",
304 "f917ce516a76ec3247bb6b0594fa7095"]],
305 "1.7.5" =>
306 [["joomla.xml",
307 "ac25a53c5412bc00cb9b66d5ba657c4d"]],
308
309 "2.5.0" =>
310 [["joomla.xml",
311 "bab83d5cec8aabbdef29509cef797cc1"]],
312 "2.5.1" =>
313 [["joomla.xml",
314 "23faf4d03ac8d539e5bdc70056dba8a1"]],
315 "2.5.2" =>
316 [["joomla.xml",
317 "c89bbb4d017e29a236ac4626ed15791b"]],
318 "2.5.3" =>
319 [["joomla.xml",
320 "50be59bf77361df3ee37dc1cb59b6f09"]],
321 "2.5.4" =>
322 [["joomla.xml",
323 "cf7bab3c4aaa6976ce46b24fa9315d3b"]],
324 "2.5.5" =>
325 [["joomla.xml",
326 "9a6697bf0a6b3fd8c367d52a8163e289"]],
327 "2.5.6" =>
328 [["joomla.xml",
329 "fd03f70094e980a288df57b74ba8bdaa"]],
330 "2.5.7" =>
331 [["joomla.xml",
332 "ddfc0ffae42633ae0792879e72848eef"]],
333 "2.5.8" =>
334 [["joomla.xml",
335 "2f60cbc0aacc748ead8942eff735e632"]],
336 "2.5.9" =>
337 [["joomla.xml",
338 "02f88367ece6d41aa277de57c48828b3"]],
339 "2.5.10" =>
340 [["joomla.xml",
341 "0327fe30ad173c02eed4d38b9db65326"]],
342 "2.5.11" =>
343 [["joomla.xml",
344 "9dba426830a3728e3fa6c7a53b52502a"]],
345
346 "3.0.0" =>
347 [["joomla.xml",
348 "83829827b08ba0d13fd395aa2c740109"]],
349 "3.0.1" =>
350 [["joomla.xml",
351 "b8a6ca102b9ce957f7f5a313cace883e"]],
352 "3.0.2" =>
353 [["joomla.xml",
354 "a9b6c08ea9a2586f94a99f00a1d2854c"]],
355 "3.0.3" =>
356 [["joomla.xml",
357 "94620da88c804fd899de117b8e93629e"]],
358 "3.0.4" =>
359 [["joomla.xml",
360 "9e3c107a884b973ffb6a1d6aebc2d7e6"]],
361
362 "3.1.0" =>
363 [["joomla.xml",
364 "989c6a5368dcf8eb84103209c3664032"]],
365 "3.1.1" =>
366 [["joomla.xml",
367 "9cf5894facfb6fffbc599e19b939d717"]],
368
369 # Arman : Update for Joomla measurements
370 "3.1.4" =>
371 [["joomla.xml",
372 "f75a9e69384d31a4fe4f30680d0c91ea"]],
373 "3.1.5" =>
374 [["joomla.xml",
375 "0d96b9b19d27ad895c9cad2792504ad2"]],
376 "3.1.6" =>
377 [["joomla.xml",
378 "9c5f607fca3ae0cc35fa1466a8acf47e"]],
379
380
381 "3.2.0" =>
382 [["joomla.xml",
383 "d3c7970633a70c67d180cf58b320443e"]],
384 "3.2.1" =>
385 [["joomla.xml",
386 "5a17be6ea10efebf675bfa352cca16b8"]],
387 "3.2.2" =>
388 [["joomla.xml",
389 "6d56cb64300bc9180b9a05040f40bacb"]],
390 "3.2.3" =>
391 [["joomla.xml",
392 "4dec33384dc38b361dda12288a64eee8"]],
393 "3.2.4" =>
394 [["joomla.xml",
395 "1e880e70cc37b6152c4514923c65addc"]],
396 "3.2.5" =>
397 [["joomla.xml",
398 "55dfd3d2095289ae4382610102c88297"]],
399 "3.2.6" =>
400 [["joomla.xml",
401 "6dfefda126eab8c83d23a85d049f05eb"]],
402 "3.2.7" =>
403 [["joomla.xml",
404 "036c196a5f70a74c1ebc5478cf9adecb"]],
405
406
407 "3.3.0" =>
408 [["joomla.xml",
409 "5177511de6cdcd532ad411f5f426d44d"]],
410 "3.3.1" =>
411 [["joomla.xml",
412 "886e505b40c82afc350cac0520e3c689"]],
413 "3.3.2" =>
414 [["joomla.xml",
415 "561a8cd4bd6dcdc0fcf2824319fe4654"]],
416 "3.3.3" =>
417 [["joomla.xml",
418 "306a4272113e1deb839daaef12325f2a"]],
419 "3.3.4" =>
420 [["joomla.xml",
421 "a6a131fbd6de228f8e3075cc31d77f4b"]],
422 "3.3.5" =>
423 [["joomla.xml",
424 "8f1c0919c712280538980a8ea960c6ed"]],
425 "3.3.6" =>
426 [["joomla.xml",
427 "0c7f302a589b86e5f7257df323936976"]],
428
429
430 "3.4.0" =>
431 [["joomla.xml",
432 "5cb248c234708f80aa1f3b9bf5a58f34"]],
433 "3.4.1" =>
434 [["joomla.xml",
435 "50af84b82156734f2b3a18c42497ed45"]],
436 "3.4.2" =>
437 [["joomla.xml",
438 "70544ca6ecc727916e481ac903aca41f"]],
439 "3.4.3" =>
440 [["joomla.xml",
441 "e71dc2439b21e4e9e3fe102d5fddcd18"]],
442 "3.4.4" =>
443 [["joomla.xml",
444 "a1c85a51822b8b99448295b5e905d49a"]],
445 "3.4.5" =>
446 [["joomla.xml",
447 "c3c4e2dfca8431dc98baa865d25a6b71"]],
448 "3.4.6" =>
449 [["joomla.xml",
450 "71312a05540240f96e0658fcf1f56249"]],
451 "3.4.7" =>
452 [["joomla.xml",
453 "6ea92d7eabbdd5818cbee9864661f7eb"]],
454 "3.4.8" =>
455 [["joomla.xml",
456 "7d78371ee69904f34df8b1c4a29c1b83"]],
457
458
459 "3.5.0" =>
460 [["plugins/system/sef/sef.xml",
461 "ea74bb8fde3fa515aa201cb4b81c0e80"]],
462 "3.5.1" =>
463 [["plugins/system/sef/sef.xml",
464 "db2183b9c63470d0321635145b68aeab"]],
465
466
467 "3.6.0" =>
468 [["plugins/editors/tinymce/tinymce.xml",
469 "26dd40542cfbbadacb89aed9d4db34d8"]],
470 "3.6.1" =>
471 [["plugins/editors/tinymce/tinymce.xml",
472 "57dfa8f3f74823e470a9b6957123b756"]],
473 "3.6.2" =>
474 [["language/en-GB/en-GB.xml",
475 "626eb97099a409e906e476798b730df2"]],
476 "3.6.3" =>
477 [["language/en-GB/en-GB.xml",
478 "95bd31c91168a75e08b93448b00955d2"]],
479 "3.6.4" =>
480 [["language/en-GB/en-GB.xml",
481 "28dc4f3c6dd4e19b984bbe3c98369f6a"]],
482
483
484
485 ]
486
487
488
489
490 v = Version.new("Joomla", versions, @base_uri)
491
492 version = v.matches_format
493
494 # Return version matches from md5 hashes, if present
495 unless version.empty?
496 version.each { |ver|
497 m << {:name => "MD5 sums", :version => ver}
498 }
499 end
500
501 # Return aggressive matches
502 m
503 end
504
505 end