diff --git a/src/analyzer/protocol/ssh/events.bif b/src/analyzer/protocol/ssh/events.bif index fd1cd776d9..5fb32d67ad 100644 --- a/src/analyzer/protocol/ssh/events.bif +++ b/src/analyzer/protocol/ssh/events.bif @@ -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 diff --git a/src/analyzer/protocol/ssh/ssh-analyzer.pac b/src/analyzer/protocol/ssh/ssh-analyzer.pac index 901f541ddf..71e8bcd423 100644 --- a/src/analyzer/protocol/ssh/ssh-analyzer.pac +++ b/src/analyzer/protocol/ssh/ssh-analyzer.pac @@ -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})); } diff --git a/src/strings.bif b/src/strings.bif index a9e8c05c3b..0d48536777 100644 --- a/src/strings.bif +++ b/src/strings.bif @@ -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(); - 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::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(*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. diff --git a/testing/btest/Baseline/bifs.split_string/out b/testing/btest/Baseline/bifs.split_string/out index 790f38eca4..0f5377c2e2 100644 --- a/testing/btest/Baseline/bifs.split_string/out +++ b/testing/btest/Baseline/bifs.split_string/out @@ -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 diff --git a/testing/btest/Baseline/language.strings/output b/testing/btest/Baseline/language.strings/output index 0011c23ec5..db6b4f5b85 100644 --- a/testing/btest/Baseline/language.strings/output +++ b/testing/btest/Baseline/language.strings/output @@ -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 diff --git a/testing/btest/bifs/split_string.zeek b/testing/btest/bifs/split_string.zeek index 73fd192d9a..11f0c5e011 100644 --- a/testing/btest/bifs/split_string.zeek +++ b/testing/btest/bifs/split_string.zeek @@ -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)"; diff --git a/testing/btest/language/strings.zeek b/testing/btest/language/strings.zeek index b5c9bfe431..f6965e547f 100644 --- a/testing/btest/language/strings.zeek +++ b/testing/btest/language/strings.zeek @@ -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];