Sha256: 280d82d86dc78c63331fe187c1f0c2a8cf41f1a4d20c2da1fec71ff989a3d27b

Contents?: true

Size: 937 Bytes

Versions: 6

Compression:

Stored size: 937 Bytes

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 "X-Forwarded-For" do
  @author = "Brendan Coles <bcoles@gmail.com>" # 2011-04-07
  @version = "0.1"
  @description = "This plugin extracts the proxy server details from the X-Forwarded-For param of the HTTP header. X-Forwarded-For is a non-standard header introduced by the developers of the Squid proxy before the Via header was added to HTTP."

  # ShodanHQ results as at 2011-04-07 #
  # 110 for X-Forwarded-For

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

    # Via HTTP header
    m << { string: target.headers["x-forwarded-for"].to_s } unless target.headers["x-forwarded-for"].nil?

    # 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/x-forwarded-for.rb
simple_whatweb-0.4.0 lib/whatweb/plugins/x-forwarded-for.rb
simple_whatweb-0.3.0 lib/whatweb/plugins/x-forwarded-for.rb
simple_whatweb-0.2.1 lib/whatweb/plugins/x-forwarded-for.rb
simple_whatweb-0.2.0 lib/whatweb/plugins/x-forwarded-for.rb
simple_whatweb-0.1.0 lib/whatweb/plugins/x-forwarded-for.rb