Sha256: cc1b1a9960f97e3710dc4b0dda0fee5223a9fd31638312124dc67551ad357fcc

Contents?: true

Size: 1.4 KB

Versions: 5

Compression:

Stored size: 1.4 KB

Contents

# frozen_string_literal: true

##
# 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
##
# Version 0.2 # 2016-04-17 # Andrew Horton
# Added website parameter
##
WhatWeb::Plugin.define "AMX-Mod-X" do
  @author = "Brendan Coles <bcoles@gmail.com>" # 2010-09-04
  @version = "0.2"
  @description = "AMX Mod X is a versatile Half-Life metamod plugin which is targetted toward server administration."
  @website = "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

  # 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(target)
    m = []

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple_whatweb-0.4.1 lib/whatweb/plugins/amxmodx.rb
simple_whatweb-0.4.0 lib/whatweb/plugins/amxmodx.rb
simple_whatweb-0.3.0 lib/whatweb/plugins/amxmodx.rb
simple_whatweb-0.2.1 lib/whatweb/plugins/amxmodx.rb
simple_whatweb-0.2.0 lib/whatweb/plugins/amxmodx.rb