mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
SSH: Fix some edge-cases which created BinPAC exceptions
This commit is contained in:
parent
29f78cf90f
commit
f33e26242c
1 changed files with 2 additions and 2 deletions
|
@ -6,17 +6,17 @@
|
|||
# We have 3 basic types of messages:
|
||||
#
|
||||
# - SSH_Version messages just have a string with the banner string of the client or server
|
||||
# - Encrypted messages have no usable data, but those never get passed in by SSH.cc
|
||||
# - Encrypted messages have no usable data, so we'll just ignore them as best we can.
|
||||
# - Finally, key exchange messages have a common format.
|
||||
|
||||
type SSH_PDU(is_orig: bool) = case $context.connection.get_state(is_orig) of {
|
||||
VERSION_EXCHANGE -> version : SSH_Version(is_orig);
|
||||
ENCRYPTED -> encrypted : bytestring &length=1 &transient;
|
||||
default -> kex : SSH_Key_Exchange(is_orig);
|
||||
} &byteorder=bigendian;
|
||||
|
||||
type SSH_Version(is_orig: bool) = record {
|
||||
version : bytestring &oneline;
|
||||
pad : bytestring &length=0 &transient;
|
||||
} &let {
|
||||
update_state : bool = $context.connection.update_state(KEX_INIT, is_orig);
|
||||
update_version : bool = $context.connection.update_version(version, is_orig);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue