[Bro-Dev] [JIRA] (BIT-1237) Bro script declaration ordering

Johanna Amann (JIRA) jira at bro-tracker.atlassian.net
Tue Oct 20 10:10:00 PDT 2015


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

Johanna Amann updated BIT-1237:
-------------------------------
    Resolution: Won't Fix
        Status: Closed  (was: Reopened)

> Bro script declaration ordering
> -------------------------------
>
>                 Key: BIT-1237
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1237
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro
>    Affects Versions: 2.3
>         Environment: Bro con training VM
>            Reporter: Peter Kaloroumakis
>            Priority: Trivial
>              Labels: BroScript
>
> During one of the scripting exercises I noticed odd behavior with items declared in the global scope:
> {code}
> ############################# error.bro
> not working:
> ------------------------------------------------
> local test_var = "test_var";
> function test_1()
>     {
>     print "test_1";
>     }
> print test_var;
> test_1();
> >>> Output:
> error in ./test.bro, line 3: syntax error, at or near "test_1"
> ############################# working.bro
> working:
> ------------------------------------------------
> function test_1()
>     {
>     print "test_1";
>     }
> local test_var = "test_var";
> print test_var;
> test_1();
> >>> Output:
> test_var
> test_1
> #############################
> {code}
> To declare a function, bro 2.3 forced me to do it at the top of the file. On the exercise with the redef of the grid ftp size variable I noticed the same issue with redef, it required me to put the redef at the very top of the file. 
> Robin asked me to open a ticket and mentioned this was low priority.



--
This message was sent by Atlassian JIRA
(v7.0.0-OD-08-002#70107)


More information about the bro-dev mailing list