Class: ListeningPortCommand
Constant Summary
collapse
- COMMAND =
"OPEN_PORT"
Instance Attribute Summary
#check, #message, #severity
Instance Method Summary
collapse
#process
Constructor Details
34
35
36
37
38
39
40
41
|
# File 'lib/audit/lib/parser/command/listening_port_command.rb', line 34
def initialize(check, severity, args)
@port = args[0].to_i if (args.length >= 1 and /^[0-9]+$/.match(args[0])) or raise ParseException "#{COMMAND} did not supply the port argument: '#{text}'"
@process = (args[1] if args.length >= 2) || ""
@interface = (args[2] if args.length >= 3) || ""
message = args[3 .. -1].join if args.length >= 4
super(check, severity, message)
end
|
Instance Method Details
#result ⇒ Object
43
44
45
|
# File 'lib/audit/lib/parser/command/listening_port_command.rb', line 43
def result()
return ListeningPortCommandResult.new(@check, @severity, @message, @port, @interface, @process)
end
|