Sha256: 33ebad04ef28f07b4ac41a40a74e9b475d94d5de84864c85bd076c73cb3ec327

Contents?: true

Size: 1.55 KB

Versions: 6

Compression:

Stored size: 1.55 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
##
WhatWeb::Plugin.define "Hiki" do
  @author = "Brendan Coles <bcoles@gmail.com>" # 2011-06-07
  @version = "0.1"
  @description = "Hiki is a powerful and fast wiki clone written in Ruby."
  @website = "http://hikiwiki.org/en/"

  # Google results as at 2011-06-07 #
  # 344 for "Generated by Hiki" "Powered by Ruby"

  # Dorks #
  @dorks = [
    '"Generated by Hiki" "Powered by Ruby"'
  ]

  # Matches #
  @matches = [

    # Version Detection # Meta Generator
    { version: /<meta name="generator" content="Hiki ([^"^\s]+)">/ },

    # Error Page
    { text: '<html><head><title>Hiki Error</title></head><body>' },

    # Version Detection # Generated by
    { version: /<div class="footer">Generated by <a href="http:\/\/hikiwiki.org\/">Hiki<\/a> ([^\s]+) \([\d]{4}-[\d]{2}-[\d]{2}\)/ },

  ]

  # Passive #
  def passive(target)
    m = []

    # Ruby Version Detection
    if target.body =~ /<div class="footer">Generated by <a href="http:\/\/hikiwiki.org\/">Hiki<\/a>/ && target.body =~ /Powered by <a href="http:\/\/www\.ruby-lang\.org\/">(Ruby)<(\/)a> ([^\s]+) \([\d]{4}-[\d]{2}-[\d]{2}\)/

      m << { string: target.body.scan(/Powered by <a href="http:\/\/www\.ruby-lang\.org\/">(Ruby)<(\/)a> ([^\s]+) \([\d]{4}-[\d]{2}-[\d]{2}\)/).flatten }

    end

    # Return passive matches
    m
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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