forked from ecrookshanks/simple-data-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathddos.sh
49 lines (35 loc) · 995 Bytes
/
ddos.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
# 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-ddos.yml