Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for hexadecimal input/output #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jazzpi
Copy link

@jazzpi jazzpi commented May 16, 2015

This PR adds two options: --hex-in and --hex-out.

If --hex-in is set, input is interpreted as space-separated bytes. E.g., 6a 61 7a 7a 70 69 is interpreted as jazzpi.

If --hex-out is set, anything coming in to the websocket is printed as space-separated bytes. E.g., if wscat is running in --listen-mode and a client sends jazzpi, it's printed out as 6a 61 7a 7a 70 69.

Note: I'm not quite sure about the internals of ws, so I just was cautious and implemented Hex conversion for Buffers, ArrayBuffers and strings (see lines 177-198).

@nwwells
Copy link
Collaborator

nwwells commented Jan 24, 2017

Looks good. Can you resolve the conflicts and I'll merge it?

FGasper pushed a commit to FGasper/wscat that referenced this pull request May 12, 2019
* WebSocket subprotocol

* Subprotocol help

* Sort subprotocol keys

* ICLIOptions fix

* Update Makefile

* Update Makefile

* Fix IOptions
@Rock-vijay
Copy link

You will try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants