mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00

- Use `-b` most everywhere, it will save time. - Start some intel tests upon the input file being fully read instead of at an arbitrary time. - Improve termination condition for some sumstats/cluster tests. - Filter uninteresting output from some supervisor tests. - Test for `notice_policy.log` is no longer needed.
23 lines
1 KiB
Text
23 lines
1 KiB
Text
# @TEST-EXEC: zeek -b -r $TRACES/modbus/fuzz-1011.trace %INPUT >output
|
|
# @TEST-EXEC: btest-diff modbus.log
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
# modbus registers are 2-byte values. Many messages send a variable amount
|
|
# of register values, with the quantity being derived from a byte count value
|
|
# that is also sent. If the byte count value is invalid (e.g. an odd value
|
|
# might not be valid since registers must be 2-byte values), then the parser
|
|
# should not trigger any asserts, but generate a protocol_violation (in this
|
|
# case TCP_ApplicationAnalyzer::ProtocolViolation asserts its behavior for
|
|
# incomplete connections).
|
|
|
|
@load base/protocols/modbus
|
|
|
|
event modbus_read_input_registers_request(c: connection, headers: ModbusHeaders, start_address: count, quantity: count)
|
|
{
|
|
print "modbus_read_input_registers_request", c$id, headers, start_address, quantity;
|
|
}
|
|
|
|
event modbus_read_input_registers_response(c: connection, headers: ModbusHeaders, registers: ModbusRegisters)
|
|
{
|
|
print "modbus_read_input_registers_response", c$id, headers, registers, |registers|;
|
|
}
|