aboutsummaryrefslogtreecommitdiff
path: root/lib/spawn
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2019-02-14 21:12:09 -0500
committerMitch Riedstra <mitch@riedstra.us>2019-02-14 21:12:09 -0500
commit9bd432b5de3592f89d885deaff953418822acaa9 (patch)
tree2dabf2f58dae9e79a4abced904d1734b4ae1d6b6 /lib/spawn
parentbd13ba3f12da9721ae9e0a81af788a3f9d9bb8f8 (diff)
downloadrshsh-9bd432b5de3592f89d885deaff953418822acaa9.tar.gz
rshsh-9bd432b5de3592f89d885deaff953418822acaa9.tar.xz
Add a readme and allocate a pty for the reverse shell
Diffstat (limited to 'lib/spawn')
-rwxr-xr-xlib/spawn7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/spawn b/lib/spawn
index 07c27d8..1d19aa4 100755
--- a/lib/spawn
+++ b/lib/spawn
@@ -5,13 +5,12 @@ SOCKDIR=$(mktemp -d)
SOCKF=${SOCKDIR}/usock
# Start tmux, if needed
-if ! tmux ls | grep -q rshell; then
- tmux new -s rshell -d
+if ! tmux ls | grep -q rshsh; then
+ tmux new -s rshsh -d
fi
# Create window
-# Let's just see it works
-tmux new-window -t rshell "socat UNIX-LISTEN:${SOCKF},umask=0077 STDIO"
+tmux new-window -t rshsh "socat UNIX-LISTEN:${SOCKF},umask=0077 file:\$(tty),raw,echo=0"
# Wait for socket
while test ! -e ${SOCKF} ; do sleep 1 ; done