From ebd440a9314ad6a179403b6938f3a182bf2278d5 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Tue, 19 Jan 2016 12:55:20 +0100 Subject: [PATCH] Adjust Parser and Socket module outputs. Adjusting the module outputs to proper work again and to provide the required information for the Event module. Signed-off-by: Stefan Schantl --- modules/Parser.pm | 4 ++-- modules/Socket.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Parser.pm b/modules/Parser.pm index 86e7aa1..ad55d20 100644 --- a/modules/Parser.pm +++ b/modules/Parser.pm @@ -31,7 +31,7 @@ sub Parser ($$) { my $action = $logfile_parsers{$file}->(@message); # Return which action should be performed. - return $action; + return "count $action"; } # @@ -45,7 +45,7 @@ sub message_parser_snort($) { # XXX # Currently this parser just returns a simple message. - return "snort_parser_return\n"; + return "$message[0] SNORT A simple Snort Message"; } 1; diff --git a/modules/Socket.pm b/modules/Socket.pm index 3b758dc..9c1985c 100644 --- a/modules/Socket.pm +++ b/modules/Socket.pm @@ -102,7 +102,7 @@ sub Message_Parser ($) { if ($optarg) { # The message is valid, return the event and # the optional argument. - return "$supported_commands{$command} $optarg"; + return "$supported_commands{$command} $optarg Socket User-requested action."; } else { # Only return the event for the recieved command. return "$supported_commands{$command}"; -- 2.39.2