mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Add get_tags_by_category BIF method
This commit is contained in:
parent
4db7d40894
commit
04d6fa3cb7
8 changed files with 120 additions and 3 deletions
2
testing/btest/Baseline/bifs.get_tags_by_category/out
Normal file
2
testing/btest/Baseline/bifs.get_tags_by_category/out
Normal file
|
@ -0,0 +1,2 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
[name=FTP, canonical_name=FTP, tag=ANALYZER_FTP, enabled=T]
|
|
@ -1,2 +1,2 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
563 seen BiFs, 0 unseen BiFs (), 0 new BiFs ()
|
||||
564 seen BiFs, 0 unseen BiFs (), 0 new BiFs ()
|
||||
|
|
15
testing/btest/bifs/get_tags_by_category.zeek
Normal file
15
testing/btest/bifs/get_tags_by_category.zeek
Normal file
|
@ -0,0 +1,15 @@
|
|||
#
|
||||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
local result = get_tags_by_category("ANALYZER");
|
||||
|
||||
for (i in result)
|
||||
{
|
||||
local rec = result[i];
|
||||
if ( rec$name == "FTP" )
|
||||
print rec;
|
||||
}
|
||||
}
|
|
@ -345,6 +345,7 @@ global known_BiFs = set(
|
|||
"get_reporter_stats",
|
||||
"get_resp_seq",
|
||||
"get_script_comments",
|
||||
"get_tags_by_category",
|
||||
"get_thread_stats",
|
||||
"get_timer_stats",
|
||||
"getenv",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue