Closed digitalcleavage closed 4 years ago
I wanted to script this but I still can't figure out how to do it properly, but I did find a solution:
websocat wss://target.server/ > output.txt
Then I can manually enter commands on stdin the output goes to stdout
It's not as elegant as I would like, but it does the job.
I wanted to script this ...
You can use something like chat(8)
to drive Websocat.
You can also "websockify" existing program using websocat, which would output everything to output.txt
after replying to authentication message, like this:
websocat -t wss://target.server/ exec:./my_program.sh
Each line my_program writes to stdout will be converted to a WebSocket message and each WebSocket message would be converted to one line on my_program's stdin.
Hi, I have a very simple use case:
I'm new to websockets and I can't seem to figure this out using websocat. The readme says this should all be doable but I am struggling to find the right commands to send.