mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Updates for SSH scripts.
This commit is contained in:
parent
9a06cece67
commit
9c2273b7a7
6 changed files with 237 additions and 141 deletions
|
@ -3,8 +3,8 @@ module SSH;
|
|||
|
||||
export {
|
||||
redef enum Software::Type += {
|
||||
SSH_SERVER,
|
||||
SSH_CLIENT,
|
||||
SERVER,
|
||||
CLIENT,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ event ssh_client_version(c: connection, version: string) &priority=4
|
|||
{
|
||||
# Get rid of the protocol information when passing to the software framework.
|
||||
local cleaned_version = sub(version, /^SSH[0-9\.\-]+/, "");
|
||||
local si = Software::parse(cleaned_version, c$id$orig_h, SSH_CLIENT);
|
||||
local si = Software::parse(cleaned_version, c$id$orig_h, CLIENT);
|
||||
Software::found(c$id, si);
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,6 @@ event ssh_server_version(c: connection, version: string) &priority=4
|
|||
{
|
||||
# Get rid of the protocol information when passing to the software framework.
|
||||
local cleaned_version = sub(version, /SSH[0-9\.\-]{2,}/, "");
|
||||
local si = Software::parse(cleaned_version, c$id$resp_h, SSH_SERVER);
|
||||
local si = Software::parse(cleaned_version, c$id$resp_h, SERVER);
|
||||
Software::found(c$id, si);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue