wscat
wscat copied to clipboard
Keep open after --execute -x option?
Seems like the connection closes immediately after invoking with the -x option?
passing -w
seems allows for arbitrarily specifying a wait time. Is there a way to keep open after -x ?
Hey, any update on this issue? I would really appreciate it if the connection wouldn't close whenever you use the -x option
I'd also like this feature 😄
It looks like someone opened a PR related to this but it also does other things: https://github.com/websockets/wscat/pull/114
The main concern seems to be in this area of the code where the wait and close logic is tightly coupled to executing a command—if you don't provide a wait flag, it closes after 2 seconds of sending a command. It should just be kept open instead if you don't provide a wait flag. You can't pass a large number either otherwise it overflows. This logic should be changed.
https://github.com/websockets/wscat/blob/5.2.0/bin/wscat#L276-L283