From 7c24b53b4f396b7bd9545ebe5ffad4b97c7a2801 Mon Sep 17 00:00:00 2001 From: Michael Torres Date: Sat, 16 Jul 2022 16:04:39 +0000 Subject: [PATCH] Enable modbus logging for requests --- scripts/base/protocols/modbus/main.zeek | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/base/protocols/modbus/main.zeek b/scripts/base/protocols/modbus/main.zeek index 46b43e491e..541e50be48 100644 --- a/scripts/base/protocols/modbus/main.zeek +++ b/scripts/base/protocols/modbus/main.zeek @@ -53,9 +53,8 @@ event modbus_message(c: connection, headers: ModbusHeaders, is_orig: bool) &prio event modbus_message(c: connection, headers: ModbusHeaders, is_orig: bool) &priority=-5 { - # Only log upon replies. - # Also, don't log now if this is an exception (log in the exception event handler) - if ( ! is_orig && ( headers$function_code <= 0x81 || headers$function_code >= 0x98 ) ) + # Don't log now if this is an exception (log in the exception event handler) + if ( headers$function_code <= 0x81 || headers$function_code >= 0x98 ) Log::write(LOG, c$modbus); }