Link to this headingTmux

https://www.youtube.com/playlist?list=PLTRNG6WIHETB4reAxbWza3CZeP9KL6Bkr

Make New Session:

tmux new-session -d -s "SessionName" -n "main" -c "$HOME"

Make New Window:

tmux new-window -t "SessionName:1" -n "1" -c "$HOME"

Send a Command to Window:

tmux send-keys -t "SessionName:1" "./Command with arguments" ENTER

Run as another user:

tmux send-keys -t "su -c 'python3 -u executor.py' python" ENTER

Link to this headingSessions

session="$1" #Check if tmux session exists tmux has-session -t $session 2>/dev/null if [ $? != 0 ]; then #Setup Windows case "$1" in iOS) tmux new-session -d -s iOS tmux new-window -d -a -n logging idevicesyslog > edge_$(date +%Y-%m-%d).log tmux new-window -d -a -n tcprelay python2 /opt/iOS/needle/needle/libs/usbmuxd/tcprelay.py -t 22:2222 tmux new-window -d -a -n ssh ssh -p 2222 -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null root@localhost tmux new-window -d -a -n frida-server /opt/Memory/Mobile/update_frida.sh $session tmux new-window -d -a -n frida ;; Android) tmux new-session -d -s Android tmux new-window -d -a -n logging adb logcat tmux new-window -d -a -n ssh adb shell tmux new-window -d -a -n frida-server /opt/Memory/Mobile/update_frida.sh $session tmux new-window -d -a -n frida ;; Web) status anacron ;; *) echo $"Usage: $0 {iOS|Android|Web}" exit 1 esac else fi # Attach to created session tmux attach-session -t $session