A friend who had experience with Perl helped me on this one. I am sure
there is a cleaner solution, but this line,

$decoded = MIME::Base64::encode($key, '');

we changed to

$decoded = MIME::Base64::encode($_, '');

and it works properly now.

It's line 188 I believe.

-Reggie



Reggie Griffin wrote:
> Hello,
>
> The ossec-batch-manager.pl script isn't working properly. When creating
> the base64 output of a line in the client.keys file, OSSEC
> uses the entire line.
>
> Here is an example:
>
> 191 examplehost 1.1.1.1
> 3565eea705af8ae86eb99c66581a8a727e330dff9b3ba076a6d7d7a0ffab5948
>
> The base64 encoding of this line is what OSSEC uses as it's key.
>
> MTkxIGV4YW1wbGVob3N0IDEuMS4xLjEgMzU2NWVlYTcwNWFmOGFlODZlYjk5YzY2NTgxYThhNzI3ZTMzMGRmZjliM2JhMDc2YTZkN2Q3YTBmZmFiNTk0OA==
>
> However, the ossec-batch-manager.pl script included in the contrib
> directory outputs a base64 of only the 3rd field.
>
> 3565eea705af8ae86eb99c66581a8a727e330dff9b3ba076a6d7d7a0ffab5948
>
> I don't have the Perl experience to fix it, but I thought I would let
> you know as it's most likely an easy fix for someone with
> some Perl knowledge.
>
> -Reggie
>
>
>
>   

Reply via email to