Class: TCellAgent::SensorEvents::CommandInjectionEvent

Inherits:
TCellSensorEvent show all
Defined in:
lib/tcell_agent/sensor_events/command_injection.rb

Instance Attribute Summary

Attributes inherited from TCellSensorEvent

#ensure, #flush, #send

Instance Method Summary collapse

Methods inherited from TCellSensorEvent

#bucket_key, #calculateOffset, #post_process

Constructor Details

#initialize(commands, blocked, matches, method = nil, remote_address = nil, route_id = nil, session_id = nil, user_id = nil, full_commandline = nil) ⇒ CommandInjectionEvent

Returns a new instance of CommandInjectionEvent.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/tcell_agent/sensor_events/command_injection.rb', line 16

def initialize(commands,
               blocked,
               matches,
               method=nil,
               remote_address=nil,
               route_id=nil,
               session_id=nil,
               user_id=nil,
               full_commandline=nil)
  super("cmdi")

  self["commands"] = commands
  self["blocked"] = blocked
  self["matches"] = matches

  if method
    self["method"] = method
  end

  if remote_address
    self["remote_address"] = remote_address
  end

  if route_id
    self["route_id"] = route_id
  end

  if session_id
    self["session_id"] = session_id
  end

  if user_id
    self["user_id"] = user_id
  end

  if full_commandline
    self["full_commandline"] = full_commandline
  end
end