Skip to content

Commit 1bbd748

Browse files
committed
Replace sleep/ctrl-c with read-based prompt for warning in setup_wargame.sh
1 parent 7e5116a commit 1bbd748

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setup_wargame.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
# Warn the user about running this on their host machine
88
# (because it makes various invasive settings-changes, and runs a ton of vulnerable services)
99
echo -e "\x1b[31;1mDON'T RUN THIS ON YOUR REAL COMPUTER\x1b[0m"
10-
echo -e "If you're running this on your real computer, \x1b[31;1mpress control-c NOW\x1b[0m to stop this script."
11-
sleep 10
10+
echo "Are you running this inside a VM? (If you don't know what that means, don't run the script.)"
11+
read -p "(yes/no)> "
12+
if [ "$REPLY" != 'yes' ]; then
13+
exit
14+
fi
1215

1316
if [ "$USER" != 'root' ]; then
1417
echo "ERROR: Script must be run using root!"

0 commit comments

Comments
 (0)