base/protocols/websocket/main.zeek
- WebSocket
Implements base functionality for WebSocket analysis.
Upon a websocket_established() event, logs all gathered information into websocket.log and configures the WebSocket analyzer with the headers collected via http events.
- Namespace:
WebSocket
- Imports:
Summary
Types
The record type for the WebSocket log. |
Redefinitions
|
Events
Event that can be handled to access the WebSocket record as it is sent on to the logging framework. |
Hooks
Experimental: Hook to intercept WebSocket analyzer configuration. |
|
Log policy hook. |
Detailed Interface
Types
Events
- WebSocket::log_websocket
- Type:
event(rec:WebSocket::Info)
Event that can be handled to access the WebSocket record as it is sent on to the logging framework.
Hooks
- WebSocket::configure_analyzer
- Type:
hook(c:connection, aid:count, config:WebSocket::AnalyzerConfig) :bool- Parameters:
Experimental – Hook to intercept WebSocket analyzer configuration.
Breaking from this hook disables the WebSocket analyzer immediately. To modify the configuration of the analyzer, use the
WebSocket::AnalyzerConfigtype.While this API allows quite some flexibility currently, should be considered experimental and may change in the future with or without a deprecation phase.
- Parameters:
c – The connection
aid – The analyzer ID for the WebSocket analyzer.
config – The configuration record, also containing information about the subprotocol and extensions.
- WebSocket::log_policy
- Type:
Log policy hook.