Sha256: 303a569170bca8c91adba9614856afc4f6d8720439fc4e346295cf07896e2731

Contents?: true

Size: 881 Bytes

Versions: 54

Compression:

Stored size: 881 Bytes

Contents

# Trisul Remote Protocol TRP Demo script
# Akhil.M & Dhinesh.K (c) 2010 Unleash Networks
# Testing change 
require 'rubygems'

require './helper'
include TrisulRP::Protocol
include TrisulRP::Keys

class TestTrisulrp < Test::Unit::TestCase

	def test_query_alerts

    target_ip = "10.1.10.10"  # 10.2.199.235"

    TrisulRP::Protocol.connect("127.0.0.1",12001,"Demo_Client.crt","Demo_Client.key") do |conn|
	
      tm_arr = TrisulRP::Protocol.get_available_time(conn)

      req =TrisulRP::Protocol.mk_request(TRP::Message::Command::ALERT_GROUP_REQUEST,
	  									:alert_group  =>TrisulRP::Guids::AG_IDS,
										:source_ip => TrisulRP::Keys.make_key(target_ip),
										:maxitems  => 1000,
										:time_interval => mk_time_interval(tm_arr))

      TrisulRP::Protocol.get_response(conn,req) do |resp|
	  	print_alert_details(conn,resp.alerts)
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
trisulrp-3.2.43 test/test_alerts.rb
trisulrp-3.2.42 test/test_alerts.rb
trisulrp-3.2.41 test/test_alerts.rb
trisulrp-3.2.40 test/test_alerts.rb
trisulrp-3.2.39 test/test_alerts.rb
trisulrp-3.2.38 test/test_alerts.rb
trisulrp-3.2.37 test/test_alerts.rb
trisulrp-3.2.36 test/test_alerts.rb
trisulrp-3.2.35 test/test_alerts.rb
trisulrp-3.2.34 test/test_alerts.rb
trisulrp-3.2.32 test/test_alerts.rb
trisulrp-3.2.31 test/test_alerts.rb
trisulrp-3.2.27 test/test_alerts.rb
trisulrp-3.2.26 test/test_alerts.rb
trisulrp-3.2.16 test/test_alerts.rb
trisulrp-3.2.15 test/test_alerts.rb
trisulrp-3.2.14 test/test_alerts.rb
trisulrp-3.2.13 test/test_alerts.rb
trisulrp-3.2.9 test/test_alerts.rb
trisulrp-3.2.8 test/test_alerts.rb