I have problems in assigning a string to a variable in the bro file
(bro-1.1d).
local act: string;
if (value == 1) {
act = "SAFE";
} else {
act = "CHECK";
}
The bro stopped when traffic was seen.
I also tried using sub_bytes. I got the following error.
1170987410.223443 /root/bro-devel/dhanesh/site/dhanbro.bro, line 293 (act =
sub_bytes(SAFE, 0, len)): error, illegal assignment in initialization.
Can anyone suggest a method for assigning strings to a variable.
Do you have this problem in 1.2.1? I just tried both of your examples on 1.2 and they worked fine for me. When bro died when you tried to assign a string to a variable did you get any error message?
I have problems in assigning a string to a variable in the bro file
(bro-1.1d).
local act: string;
if (value == 1) {
act = "SAFE";
} else {
act = "CHECK";
}
The bro stopped when traffic was seen.
If at all possible when posting problems like this to the list, please
include a full script that illustrates the problem (and if you can a trace,
if needed). The above has a variable "value" that isn't declared, so I
dont know how to try reproducing it.
It also isn't clear what you mean "stopped when traffic was seen". Do you
mean the Bro process exited/crashed?