I wrote a new analyzer with BinPAC for a protocol named 'AMS'.
Somehow when I create the analyzer via the binpac python script and name the analyzer 'AMS' or 'ams', the analyzer won't work. When I name it 'TEST' or 'test', it works fine (same protocol specification, C++ Code, etc.)
Is there a name convention for new analyzer? Or does anyone know, why BinPAC/Bro won't accept the name 'ams'?
"Don't work" means that it doesn't raise any event nor executes the (C++) code in the analyser.pac file. It's like it can't read the traffic or something.
Like I said, when I name it Test or PROTO-AMS or something like that, it works fine.
Interesting, I am not really aware of any reason why just using AMS should
not work.
Do you appen to have your code up on github (or somewhere else)? Then I
could take a look.
If you want to investigate for a bit yourself, build bro with
--enable-debug, start it with -B dpd and look at debug.log. There you
should see if data is sent to your analyzer - that might already give you
pointers if something is going wrong at/before/after this step.
This is the binPAC code. Like I said, only the standard code, untouched (except the std::cout line).
The same code with Test instead of AMS works fine. I don't know, maybe I'm doing something wrong, I've tested it on 3 VMs and on a Raspberry Pi, but the result are always the same.