forked from ecrookshanks/simple-data-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrdp.sh
70 lines (51 loc) · 1.46 KB
/
rdp.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
sudo apt update -y
sudo apt install cowsay -y
sudo apt install cmatrix -y
# The line to add to ~/.bashrc
line_to_add='export PATH=$PATH:/usr/games'
# Check if the line already exists in .bashrc to avoid duplicates
if ! grep -Fxq "$line_to_add" ~/.bashrc; then
# Append the line to the bottom of ~/.bashrc
echo "$line_to_add" >> ~/.bashrc
echo "Line added to ~/.bashrc"
else
echo "Line already exists in ~/.bashrc"
fi
# Reload .bashrc to apply changes
source ~/.bashrc
# Clear the screen
clear
# Run cmatrix in the background
cmatrix -b -u 5 &
# Get the process ID of cmatrix to stop it later
MATRIX_PID=$!
# Wait for 2 seconds to let cmatrix start
sleep 2
# Hide cursor
tput civis
# Get terminal dimensions
rows=$(tput lines)
cols=$(tput cols)
# Center the message
message="Loading, please stand by."
message_length=${#message}
center_col=$(( (cols - message_length) / 2 ))
center_row=$(( rows / 2 ))
# Print the message in the center
tput cup $center_row $center_col
echo "$message" | cowsay
# Wait for 8 seconds with the message displayed
sleep 8
# Kill cmatrix process
kill $MATRIX_PID
# Show cursor again and clear screen
tput cnorm
clear
echo "You took the red pill, now we will see how far the rabbit hole goes."
echo
echo
echo
echo
echo "Starting data ingestion, press CTRL + C to unplug from the Matrix."
java -jar /root/simple-data-generator/build/libs/simple-data-generator-1.0.0-SNAPSHOT.jar /root/simple-data-generator/secops-windows.yml