File: amxmodx.rb

package info (click to toggle)
whatweb 0.4.8~git20120606-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,956 kB
  • sloc: ruby: 53,738; sh: 577; makefile: 34
file content (46 lines) | stat: -rw-r--r-- 1,396 bytes parent folder | download
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
##
# 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 "AMX-Mod-X" do
author "Brendan Coles <bcoles@gmail.com>" # 2010-09-04
version "0.1"
description "AMX Mod X is a versatile Half-Life metamod plugin which is targetted toward server administration. - homepage http://www.amxmodx.org/"

# Dorks #
dorks [
'ext:cfg "Linux users may encounter problems if they specify"'
]

# 4 results for ext:cfg "Linux users may encounter problems if they specify" @ 2010-09-04
examples %w|
www.ciberinc.cl/dod/publico/dod/addons/amxmodx/configs/sql.cfg
amxmodx.ucoz.ru/_fr/25/0749705.cfg
amxmodx.ucoz.ru/_fr/25/sql.cfg
|

# Matches #
matches [

{ :text=>'// *NOTE* amx_sql_type specifies the DEFAULT database type which admin.sma will use.' },

]

# Grab mySQL username, server and database details
def passive
	m=[]

	if @body =~ /amx_sql_host[\s]+"([^\"]*)"/ and @body =~ /amx_sql_user[\s]+"([^\"]+)"/ and @body =~ /amx_sql_pass[\s]+"([^\"]*)"/
                version=@body.scan(/amx_sql_user[\s]+"([^\"]+)"/)[0][0] + ":" + @body.scan(/amx_sql_pass[\s]+"([^\"]*)"/)[0][0] + "@" + @body.scan(/amx_sql_host[\s]+"([^\"]+)"/)[0][0]
                m << {:version=>version}
        end

        m

end


end