Skip to content

websocket

The websocket identity: WebSocket frames over an HTTP upgrade. Every field and what is required.

websocket speaks WebSocket frames over an HTTP upgrade. The session persists across steps, so a solution can stage the upgrade in one step and fire frames in the next. The target is a base URL. The runtime computes the masked text frame, so a dynamic payload needs no hand-computed frame lengths.

Fields

send field

Required. The text payload, sent as a masked WebSocket text frame. Variables are filled in as text. The hex "text" form does not apply here; the payload is sent as-is.

recv field

Optional. How many bytes to read at most.

recv_until field

Optional. Stop reading once this hex marker appears.

timeout field

Optional. How long to wait, in seconds. Example: 5.

close field

Optional. When true, end the session after this step.

capture field

Optional. Pulls a value out of the received hex for later steps. The pattern runs over the hex and group 1 is hex-decoded before storing.

websocket negotiate
  send: "..."
  capture port: "(....)"

Later steps reference {port}.

ws-text framing

The step’s send is treated as a UTF-8 text payload and wrapped into a masked WebSocket text frame with the length computed by the engine, so you never hand-compute frame lengths.

Example

websocket ws-rpc
  meaning: send a JSON-RPC request over the open WebSocket
  send: "{\"jsonrpc\":\"2.0\",\"id\":{port}}"
  assert: contains "..."

Write attacks down. Verify them.

Download the binary, point it at a target you own, and get a verified result. The corpus is open and the format is plain text.