Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/websockets/wscat
WebSocket cat
https://github.com/websockets/wscat
Last synced: 3 days ago
JSON representation
WebSocket cat
- Host: GitHub
- URL: https://github.com/websockets/wscat
- Owner: websockets
- License: mit
- Created: 2015-01-27T08:54:32.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-08T12:47:58.000Z (2 months ago)
- Last Synced: 2024-12-02T21:04:30.464Z (11 days ago)
- Language: JavaScript
- Size: 65.4 KB
- Stars: 2,267
- Watchers: 41
- Forks: 223
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - websockets/wscat - WebSocket cat (JavaScript)
- awesome-list - wscat
README
# wscat
WebSocket cat.
## Installation
This module needs to be installed globally so use the `-g` flag when installing:
```
npm install -g wscat
```## Usage
```
Usage: wscat [options] (--listen | --connect )Options:
-V, --version output the version number
--auth add basic HTTP authentication header
--ca specify a Certificate Authority (--connect only)
--cert specify a Client SSL Certificate (--connect only)
--host optional host
--key specify a Client SSL Certificate's key (--connect only)
--max-redirects [num] maximum number of redirects allowed (default: 10)
--no-color run without color
--passphrase [passphrase] specify a Client SSL Certificate Key's passphrase (--connect
only). If you don't provide a value, it will be prompted for
--proxy <[protocol://]host[:port]> connect via a proxy. Proxy must support CONNECT method
--slash enable slash commands for control frames (/ping [data], /pong
[data], /close [code [, reason]]) (--connect only)
-c, --connect connect to a WebSocket server
-H, --header set an HTTP header. Repeat to set multiple (--connect only)
(default: [])
-l, --listen listen on port
-L, --location follow redirects
-n, --no-check do not check for unauthorized certificates (--connect only)
-o, --origin optional origin
-p, --protocol optional protocol version
-P, --show-ping-pong print a notification when a ping or pong is received
(--connect only)
-s, --subprotocol optional subprotocol. Repeat to specify more than one
(default: [])
-w, --wait wait given seconds after executing command
-x, --execute execute command after connecting (--connect only)
-h, --help display help for command
```## Example
```
$ wscat -c ws://websocket-echo.com
Connected (press CTRL+C to quit)
> hi there
< hi there
> are you a happy parrot?
< are you a happy parrot?
```## License
[MIT](LICENSE)