mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
19 lines
512 B
Text
19 lines
512 B
Text
##! Internal functions used by the extraction file analyzer.
|
|
|
|
module FileExtract;
|
|
|
|
%%{
|
|
#include "file_analysis/Manager.h"
|
|
%%}
|
|
|
|
## :bro:see:`FileExtract::set_limit`.
|
|
function FileExtract::__set_limit%(file_id: string, args: any, n: count%): bool
|
|
%{
|
|
using BifType::Record::Files::AnalyzerArgs;
|
|
RecordVal* rv = args->AsRecordVal()->CoerceTo(AnalyzerArgs);
|
|
bool result = file_mgr->SetExtractionLimit(file_id->CheckString(), rv, n);
|
|
Unref(rv);
|
|
return new Val(result, TYPE_BOOL);
|
|
%}
|
|
|
|
module GLOBAL;
|