]> git.ipfire.org Git - people/stevee/guardian.git/commitdiff
Adjust Parser and Socket module outputs.
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 19 Jan 2016 11:55:20 +0000 (12:55 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 19 Jan 2016 11:55:20 +0000 (12:55 +0100)
Adjusting the module outputs to proper work again and
to provide the required information for the Event module.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
modules/Parser.pm
modules/Socket.pm

index 86e7aa18df037f13d3b7a8460fb5e907cec4effb..ad55d20085afdee3ec106cc587c6f053e1249ebf 100644 (file)
@@ -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;
index 3b758dc4b780258965d261fb2a66786f84614d21..9c1985c924bc253a5a2af06e918a9a3f352258eb 100644 (file)
@@ -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}";