-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhidden1.sh
executable file
·38 lines (29 loc) · 951 Bytes
/
hidden1.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
mkdir hidden1
touch ./hidden1/client1.txt
# Start a new Tmux session named 'multi_terminal'
tmux new-session -d -s hidden1
tmux split-window -h
# Send commands to the panes (adjust commands as needed)
tmux send-keys -t 0 'nc localhost 8888 1>./hidden1/client1.txt' C-m
tmux send-keys -t 0 'login abc123' C-m
sleep 0.05
tmux send-keys -t 0 'register abc123 123@123' C-m
sleep 0.05
tmux send-keys -t 0 'login abc123 123@123' C-m
sleep 0.05
tmux send-keys -t 0 'enter-chat-room 12' C-m
sleep 0.05
tmux send-keys -t 0 'starburst stream!!!' C-m
sleep 0.05
tmux send-keys -t 0 '/pin starburst stream!!!' C-m
sleep 0.05
tmux send-keys -t 0 '/pin starburst stream!!!' C-m
sleep 0.05
tmux send-keys -t 0 '/list-user' C-m
sleep 0.05
tmux send-keys -t 0 'exit' C-m
sleep 0.05
tmux send-keys -t 1 'diff ./hidden1/client1_ans.txt ./hidden1/client1.txt' C-m
# Attach to the Tmux session to view the created panes
tmux attach-session -t hidden1