1##
2# This file is part of WhatWeb and may be subject to
3# redistribution and commercial restrictions. Please see the WhatWeb
4# web site for more information on licensing and terms of use.
5# http://www.morningstarsecurity.com/research/whatweb
6##
7# Version 0.2 # 2016-04-18 # Andrew Horton
8# Added website parameter
9#
10##
11Plugin.define "Barracuda-Load-Balancer" do
12author "Aung Khant <http://yehg.net/>" # 2011-02-04
13version "0.2"
14description "Barracuda Load Balancer"
15website "http://www.barracudanetworks.com/ns/products/balancer_overview.php"
16
17matches [
18    {:name=>"BNI__BARRACUDA_LB_COOKIE cookie", :text => "BNI__BARRACUDA_LB_COOKIE", :search => "headers[set-cookie]" },
19    {:name=>"BNI_BARRACUDA_LB_COOKIE cookie", :text => "BNI_BARRACUDA_LB_COOKIE", :search => "headers[set-cookie]" },
20]
21
22def passive
23    m = []
24
25    if @headers["set-cookie"] =~ /BARRACUDA_LB_COOKIE=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/i
26        internal_ip = @headers["set-cookie"].scan(/BARRACUDA_LB_COOKIE=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/i)
27        m << {:string=>'Internal IP: ' + internal_ip.to_s}
28    end
29    m
30
31end
32
33
34end
35
36
37