mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00

support reading from commands by adppending | to the filename. support streaming reads from command. Fix something to make rearead work better. (magically happened)
33 lines
576 B
Text
33 lines
576 B
Text
#
|
|
# @TEST-EXEC: bro -b %INPUT >out
|
|
# @TEST-EXEC: btest-diff out
|
|
|
|
@TEST-START-FILE input.log
|
|
sdfkh:KH;fdkncv;ISEUp34:Fkdj;YVpIODhfDF
|
|
DSF"DFKJ"SDFKLh304yrsdkfj@#(*U$34jfDJup3UF
|
|
q3r3057fdf
|
|
sdfs\d
|
|
|
|
dfsdf
|
|
sdf
|
|
3rw43wRRERLlL#RWERERERE.
|
|
@TEST-END-FILE
|
|
|
|
|
|
module A;
|
|
|
|
type Val: record {
|
|
s: string;
|
|
};
|
|
|
|
event line(description: Input::EventDescription, tpe: Input::Event, s: string) {
|
|
print description;
|
|
print tpe;
|
|
print s;
|
|
}
|
|
|
|
event bro_init()
|
|
{
|
|
Input::add_event([$source="wc input.log |", $reader=Input::READER_RAW, $name="input", $fields=Val, $ev=line]);
|
|
Input::remove("input");
|
|
}
|