Sha256: 7db80a80c239df6684ac7ad4b3584e80382508201f9d15f1fa53a0d2a32fd949

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 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 #
# Added content-type application/perl match
##
WhatWeb::Plugin.define "Perl" do
  @author = "Brendan Coles <bcoles@gmail.com>" # 2010-10-26
  @version = "0.2"
  @description = "Perl is a highly capable, feature-rich programming language with over 22 years of development."
  @website = "http://www.perl.org/"

  # About 309934 ShodanHQ results for "server: perl/v" @ 2010-10-26

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

    # HTTP Server Header
    m << { version: target.headers["server"].to_s.scan(/[^\r^\n]*Perl\/v([^\s^\r^\n]+)/i).flatten } if target.headers["server"].to_s =~ /[^\r^\n]*Perl\/v([^\s^\r^\n]+)/i

    # HTTP Content-Type Header
    m << { name: "application/perl" } if target.headers["content-type"] =~ /application\/perl/i

    m
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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