diff options
author | Robert Gustafsson <robg@student.chalmers.se> | 2017-09-26 09:10:55 +0200 |
---|---|---|
committer | Andreas Lindhé <andreas@lindhe.io> | 2017-10-09 12:14:35 +0200 |
commit | a5cfcd3770e0860013bef2e2fdfe2ec4969bdab7 (patch) | |
tree | 9855c60a5ab265612e7c12a79d45d5a420bf99db /pasad_bro.bro | |
parent | 888e5074c46584ae9f9b4621cb9b4ae1084aa100 (diff) | |
download | midbro-a5cfcd3770e0860013bef2e2fdfe2ec4969bdab7.tar.gz midbro-a5cfcd3770e0860013bef2e2fdfe2ec4969bdab7.tar.bz2 |
Add first test of broccoli
Diffstat (limited to 'pasad_bro.bro')
-rw-r--r-- | pasad_bro.bro | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pasad_bro.bro b/pasad_bro.bro new file mode 100644 index 0000000..c324856 --- /dev/null +++ b/pasad_bro.bro @@ -0,0 +1,26 @@ +@load frameworks/communication/listen +module Pasad; + +redef Communication::listen_port = 47760/tcp; + +redef Communication::listen_ssl = F; + +global response: event(register: count, uid: count); + +redef Communication::nodes += { + ["pasad"] = [$host = 127.0.0.1, $events = /pasad/, $connect=F, $ssl=F] +}; + +event modbus_read_holding_registers_request(c: connection, headers: ModbusHeaders, start_adress: count, quantity: count) + +{ + print fmt("Request: %d", quantity); +} + +event modbus_read_holding_registers_response(c: connection, headers: ModbusHeaders, registers: ModbusRegisters) + +{ + print fmt("Response: %d", registers[0]); + event response(registers[0],headers$uid); +} + |