mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
drop services starting with -
This commit is contained in:
parent
f7a8e8c8fb
commit
1f7f42daea
1 changed files with 2 additions and 8 deletions
|
@ -223,16 +223,10 @@ function known_services_done(c: connection)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: this is a temporary patch, because sometimes in c$service the protocol name is written with "-"
|
# Drop services starting with "-"
|
||||||
# at the beginning. This comes from the analyzers (I've seen it for HTTP and SSL), but causes problems
|
|
||||||
# when checking for known_services on triplets (host, port, services). The service starting with "-" (i.e. -HTTP) is
|
|
||||||
# reconized as different from the normal one (HTTP).
|
|
||||||
# It would be better to correct the analyzers some time later...
|
|
||||||
local tempservs : set[string];
|
local tempservs : set[string];
|
||||||
for (s in c$service)
|
for (s in c$service)
|
||||||
if ( s[0] == "-" )
|
if ( s[0] != "-" )
|
||||||
add tempservs[s[1:]];
|
|
||||||
else
|
|
||||||
add tempservs[s];
|
add tempservs[s];
|
||||||
|
|
||||||
local info = ServicesInfo($ts = network_time(), $host = id$resp_h,
|
local info = ServicesInfo($ts = network_time(), $host = id$resp_h,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue