conpot.protocols.modbus package¶
Submodules¶
conpot.protocols.modbus.modbus_block_databus_mediator module¶
- class conpot.protocols.modbus.modbus_block_databus_mediator.ModbusBlockDatabusMediator(databus_key, starting_address)¶
Bases:
objectThis class represents the values for a range of addresses
- is_in(starting_address, size)¶
Returns true if a block with the given address and size would overlap this block
conpot.protocols.modbus.modbus_server module¶
- conpot.protocols.modbus.modbus_server.ModbusServer¶
alias of
Wrapper
conpot.protocols.modbus.slave module¶
- class conpot.protocols.modbus.slave.MBSlave(slave_id, dom)¶
Bases:
SlaveCustomized Modbus slave representation extending modbus_tk.modbus.Slave
- add_block(block_name, block_type, starting_address, size)¶
Add a new block identified by its name
- handle_request(request_pdu, broadcast=False)¶
parse the request pdu, makes the corresponding action and returns the response pdu
conpot.protocols.modbus.slave_db module¶
- class conpot.protocols.modbus.slave_db.SlaveBase(template)¶
Bases:
DatabankDatabase keeping track of the slaves.
- add_slave(slave_id, unsigned=True, memory=None)¶
Add a new slave with the given id
- handle_request(query, request, mode)¶
Handles a request. Return value is a tuple where element 0 is the response object and element 1 is a dictionary of items to log.