[ 
https://bro-tracker.atlassian.net/browse/BIT-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jon Siwek updated BIT-1261:
---------------------------
    Assignee: Jon Siwek

> Bro plugin documentation incomplete
> -----------------------------------
>
>                 Key: BIT-1261
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1261
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: bro-aux
>            Reporter: AK
>            Assignee: Jon Siwek
>              Labels: documentation
>
> I found some issues with the steps found here: 
> <https://www.bro.org/sphinx-git/devel/plugins.html>. The three important 
> changes include running configure with the Bro directory option set, the name 
> of the *.bif file matches the plugin name specified to init-plugin, and the 
> call to byte_vec() in the return line of the example rot13 function. Other 
> than that, everything worked rather nicely.
> The steps should be:
> cd aux/bro-aux/plugin-support
> mkdir rot13-plugin
> cd rot13-plugin
> ../init-plugin Demo Rot13
> # edit src/rot13.bif to include the following, note the difference in the 
> return line
> module CaesarCipher;
> function rot13%(s: string%) : string
>     %{
>     char* rot13 = copy_string(s->CheckString());
>     for ( char* p = rot13; *p; p++ )
>         {
>         char b = islower(*p) ? 'a' : 'A';
>         *p  = (*p - b + 13) % 26 + b;
>         }
>     return new StringVal(new BroString(1, byte_vec(rot13), strlen(rot13)));
>     %}
> ./configure --bro-dist=%BRO_DIR%
> make
> export 
> BRO_PLUGIN_PATH=$BRO_PLUGIN_PATH:%BRO_DIR%/bro/aux/bro-aux/plugin-support/MY_PLUGIN_NAME
> %BRO_DIR%/build/src/bro -N
> %BRO_DIR%/bro -e 'print CaesarCipher::rot13("Hello")'



--
This message was sent by Atlassian JIRA
(v6.4-OD-05-009#64003)
_______________________________________________
bro-dev mailing list
[email protected]
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev

Reply via email to