Skip to content

Websocket

The Websocket module attempts to connect to a Websocket server and extract a banner.

Websocket Request Example

curl -v -L https://api.binaryedge.io/v1/tasks -d '{"type":"scan", "options":[{"targets":["X.X.X.X"], "ports":[{"port":8080, "protocol":"tcp", "modules":["websocket"]}]}]}' -H "X-Token:<Token>"

Websocket Request Options

These are optional parameters that can alter the behaviour of the module. These options can be inserted into the "config" object on the request.

  • ipv6 - Whether to use IPv6 instead of IPv4
    • "config":{"ipv6":true}
  • https - Whether to use HTTPS instead of HTTP
    • "config":{"https":true}
  • http_path - Set HTTP path
    • "config":{"http_path":"/robots.txt"}

Schema

Websocket Event Schema

{
  ...
  "result": {
    "data": {
      "state": "string",
      "url": "string",
      "banner": "string",
      "error": "string"
    }
  ...
}

Contents of the fields

  • state - State of the connection to the remote server
  • url - URL used to connect to the remote server
  • banner - Server response from which information was extracted
  • error - If there was an issue connecting to the remote issue, which was it

Websocket Event Example

{
  ...
  "result": {
    "data": {
      "state": "open",
      "url": "ws://xxx.xxx.xxx.xxx:8080/",
      "banner": ""
    }
  ...
}