mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Remove some deprected methods/events from bif files
This commit is contained in:
parent
b819c9d18c
commit
7292b52f66
7 changed files with 1 additions and 61 deletions
|
@ -144,9 +144,7 @@ event ssh2_server_host_key%(c: connection, key: string%);
|
|||
## ssh_auth_attempted ssh_capabilities ssh2_server_host_key
|
||||
## ssh_server_host_key ssh_encrypted_packet ssh2_dh_server_params
|
||||
## ssh2_gss_error ssh2_ecc_key
|
||||
event ssh1_server_host_key%(c: connection, p: string &deprecated="Remove in v4.1", e: string &deprecated="Remove in v4.1", modulus: string, exponent: string%);
|
||||
event ssh1_server_host_key%(c: connection, modulus: string, exponent: string%);
|
||||
event ssh1_server_host_key%(c: connection, p: string, e: string%) &deprecated="Remove in v4.1. The 'p' and 'e' parameters are misleadingly named don't use them.";
|
||||
|
||||
## During the :abbr:`SSH (Secure Shell)` key exchange, the server
|
||||
## supplies its public host key. This event is generated when the
|
||||
|
|
|
@ -197,8 +197,6 @@ refine flow SSH_Flow += {
|
|||
{
|
||||
zeek::BifEvent::enqueue_ssh1_server_host_key(connection()->zeek_analyzer(),
|
||||
connection()->zeek_analyzer()->Conn(),
|
||||
to_stringval(${exp}),
|
||||
to_stringval(${mod}),
|
||||
to_stringval(${mod}),
|
||||
to_stringval(${exp}));
|
||||
}
|
||||
|
|
|
@ -695,44 +695,6 @@ function str_smith_waterman%(s1: string, s2: string, params: sw_params%) : sw_su
|
|||
return result;
|
||||
%}
|
||||
|
||||
## Splits a string into substrings with the help of an index vector of cutting
|
||||
## points.
|
||||
##
|
||||
## s: The string to split.
|
||||
##
|
||||
## idx: The index vector (``vector of count``) with the cutting points.
|
||||
##
|
||||
## Returns: A one-indexed vector of strings.
|
||||
##
|
||||
## .. zeek:see:: split_string split_string1 split_string_all split_string_n
|
||||
function str_split%(s: string, idx: index_vec%): string_vec &deprecated="Remove in v4.1. Use str_split_indices."
|
||||
%{
|
||||
auto idx_v = idx->As<VectorVal*>();
|
||||
auto n = idx_v->Size();
|
||||
zeek::String::IdxVec indices(n);
|
||||
unsigned int i;
|
||||
|
||||
for ( i = 0; i < n; i++ )
|
||||
indices[i] = idx_v->CountAt(i);
|
||||
|
||||
zeek::String::Vec* result = s->AsString()->Split(indices);
|
||||
auto result_v = zeek::make_intrusive<zeek::VectorVal>(zeek::id::string_vec);
|
||||
|
||||
if ( result )
|
||||
{
|
||||
i = 1;
|
||||
|
||||
for ( zeek::String::VecIt it = result->begin();
|
||||
it != result->end(); ++it, ++i )
|
||||
result_v->Assign(i, zeek::make_intrusive<zeek::StringVal>(*it));
|
||||
// StringVal now possesses string.
|
||||
|
||||
delete result;
|
||||
}
|
||||
|
||||
return result_v;
|
||||
%}
|
||||
|
||||
## Splits a string into substrings with the help of an index vector of cutting
|
||||
## points. This differs from str_split() in that it does not return an empty element
|
||||
## at the beginning of the result.
|
||||
|
|
|
@ -19,8 +19,6 @@ t
|
|||
hi
|
||||
s is a test
|
||||
---------------------
|
||||
[, thi, s i, s a tes, t]
|
||||
---------------------
|
||||
[thi, s i, s a tes, t]
|
||||
---------------------
|
||||
X-Mailer
|
||||
|
|
|
@ -1,16 +1,8 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
warning in <...>/strings.zeek, line 26: deprecated (str_split): Remove in v4.1. Use str_split_indices.
|
||||
Input string: broisaveryneatids
|
||||
|
||||
String splitting
|
||||
----------------
|
||||
Splitting 'broisaveryneatids' at 6 points...
|
||||
bro
|
||||
is
|
||||
a
|
||||
very
|
||||
neat
|
||||
ids
|
||||
Splitting 'broisaveryneatids' at 6 points in zero-indexed mode...
|
||||
bro
|
||||
is
|
||||
|
|
|
@ -24,8 +24,6 @@ event zeek_init()
|
|||
print "---------------------";
|
||||
print_string_vector(split_string_n(a, pat, T, 1));
|
||||
print "---------------------";
|
||||
print str_split(a, idx);
|
||||
print "---------------------";
|
||||
print str_split_indices(a, idx);
|
||||
print "---------------------";
|
||||
a = "X-Mailer: Testing Test (http://www.example.com)";
|
||||
|
|
|
@ -22,14 +22,8 @@ event zeek_init()
|
|||
idx1[4] = 10;
|
||||
idx1[5] = 14;
|
||||
|
||||
print fmt("Splitting '%s' at %d points...", s1, |idx1|);
|
||||
local res_split: string_vec = str_split(s1, idx1);
|
||||
|
||||
for ( i in res_split )
|
||||
print res_split[i];
|
||||
|
||||
print fmt("Splitting '%s' at %d points in zero-indexed mode...", s1, |idx1|);
|
||||
res_split = str_split_indices(s1, idx1);
|
||||
local res_split: string_vec = str_split_indices(s1, idx1);
|
||||
|
||||
for ( i in res_split )
|
||||
print res_split[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue