Skip to content

Commit

Permalink
Replaced the white colored font with a yellow color due to visibility…
Browse files Browse the repository at this point in the history
… problems on a terminal with a white background.
  • Loading branch information
radio24 committed Mar 29, 2024
1 parent 851613a commit 7d8d7cb
Show file tree
Hide file tree
Showing 33 changed files with 609 additions and 608 deletions.
10 changes: 5 additions & 5 deletions bin/backup
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ MENU_HEIGHT_20=20

#Colors
RED='\033[1;31m'
WHITE='\033[1;37m'
YELLOW='\033[1;93m'
NOCOLOR='\033[0m'

#Generating the filename for the backup
Expand Down Expand Up @@ -177,15 +177,15 @@ if (whiptail --title "TorBox - INFO (scroll down!)" --scrolltext --no-button "NO
(sudo ln -sf "${WEBSITE_DIR}" "${BACKUP_DIR}/shared_folders") 2>/dev/null
fi
echo ""
echo -e "${WHITE}[+] Backup is done!${NOCOLOR}"
echo -e "${RED}[+] You will find it here: ${WHITE}${OS_BK_TAR}"
echo -e "${YELLOW}[+] Backup is done!${NOCOLOR}"
echo -e "${RED}[+] You will find it here: ${YELLOW}${OS_BK_TAR}"
echo " "
read -n 1 -s -r -p $'\e[1;31mPlease press any key to continue... \e[0m'
clear
else
clear
echo -e "${WHITE}[!] ABORT! NOT ENOUGH SPACE!${NOCOLOR}"
echo -e "${WHITE}[+] Did you include shared folders? Please, try again without them!${NOCOLOR}"
echo -e "${YELLOW}[!] ABORT! NOT ENOUGH SPACE!${NOCOLOR}"
echo -e "${YELLOW}[+] Did you include shared folders? Please, try again without them!${NOCOLOR}"
echo " "
read -n 1 -s -r -p $'\e[1;31mPlease press any key to continue... \e[0m'
clear
Expand Down
18 changes: 9 additions & 9 deletions bin/bridges_activate_obfs4
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ MENU_LIST_HEIGHT=$((NO_ITEMS+NO_SPACER))

#Colors
RED='\033[1;31m'
WHITE='\033[1;37m'
YELLOW='\033[1;93m'
NOCOLOR='\033[0m'

#Other variables
Expand Down Expand Up @@ -85,7 +85,7 @@ fi

if [ $number_configured_bridges_deactivated = 0 ]; then
clear
echo -e "${WHITE}[!] There are no deactivated OBFS4 bridges. ${NOCOLOR}"
echo -e "${YELLOW}[!] There are no deactivated OBFS4 bridges. ${NOCOLOR}"
echo -e "${RED}[+] You may use the menu entry \"Deactivate OBFS4...\". ${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
Expand Down Expand Up @@ -119,7 +119,7 @@ case "$CHOICE" in
clear
online_check $BRIDGE_DB_URL 0 1
if [ $OCHECK == 1 ]; then
echo -e "${WHITE}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo -e "${YELLOW}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo " "
echo -e "${RED}[+] Checking for bridges to activate - please wait...${NOCOLOR}"
trap break SIGINT
Expand Down Expand Up @@ -158,7 +158,7 @@ case "$CHOICE" in
exit 0
else
echo ""
echo -e "${WHITE}[!] There are no usable OBFS4 bridges :( ${NOCOLOR}"
echo -e "${YELLOW}[!] There are no usable OBFS4 bridges :( ${NOCOLOR}"
echo -e "${RED}[+] Please add some new OBFS4 bridges first! ${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
Expand All @@ -167,8 +167,8 @@ case "$CHOICE" in
fi
else
echo ""
echo -e "${WHITE}[!] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${WHITE}[!] Can't fetch the status of the bridges - ABORTING :( ${NOCOLOR}"
echo -e "${YELLOW}[!] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${YELLOW}[!] Can't fetch the status of the bridges - ABORTING :( ${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
clear
Expand All @@ -182,23 +182,23 @@ case "$CHOICE" in
clear
if [ $OCHECK == 1 ]; then
if (whiptail --title "TorBox - BRIDGE ACTIVATION" --yesno "Do you want to see the ONLINE/OFFLINE status of the bridges?" $MENU_HEIGHT_10 $MENU_WIDTH_REDUX); then
echo -e "${WHITE}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo -e "${YELLOW}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo " "
sleep 2
STATUS=1
else
STATUS=0
fi
else
echo -e "${WHITE}[!] SORRY! - no connection with the bridge database${NOCOLOR}"
echo -e "${YELLOW}[!] SORRY! - no connection with the bridge database${NOCOLOR}"
echo -e "${RED}[!] We'll go ahead anyway.${NOCOLOR}"
echo " "
sleep 3
fi
number_of_obfs4_bridges
if [ "$number_configured_bridges_deactivated" == "0" ]; then
echo ""
echo -e "${WHITE}[!] There is no deactivated bridge, which can be activated!${NOCOLOR}"
echo -e "${YELLOW}[!] There is no deactivated bridge, which can be activated!${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
clear
Expand Down
8 changes: 4 additions & 4 deletions bin/bridges_activate_snowflake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ MENU_HEIGHT_10=10

#Colors
RED='\033[1;31m'
WHITE='\033[1;37m'
YELLOW='\033[1;93m'
NOCOLOR='\033[0m'

#Other variables
Expand Down Expand Up @@ -78,7 +78,7 @@ fi

if [ "$number_configured_snowflake_bridges_deactivated" == "0" ]; then
echo ""
echo -e "${WHITE}[!] There is no deactivated bridge, which can be activated!${NOCOLOR}"
echo -e "${YELLOW}[!] There is no deactivated bridge, which can be activated!${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
clear
Expand All @@ -94,15 +94,15 @@ OCHECK=0
# IMORTANT: the support to show the ONLINE/OFFLINE status of Snowflake bridges is currently disabled because it is not reliable.
#if [ $OCHECK == 1 ]; then
# if (whiptail --title "TorBox - BRIDGE ACTIVATION" --yesno "Do you want to see the ONLINE/OFFLINE status of the bridges?" $MENU_HEIGHT_10 $MENU_WIDTH_REDUX); then
# echo -e "${WHITE}[+] OK - we are connected with the bridge database${NOCOLOR}"
# echo -e "${YELLOW}[+] OK - we are connected with the bridge database${NOCOLOR}"
# echo " "
# sleep 2
# STATUS=1
# else
STATUS=0
# fi
#else
# echo -e "${WHITE}[!] SORRY! - no connection with the bridge database${NOCOLOR}"
# echo -e "${YELLOW}[!] SORRY! - no connection with the bridge database${NOCOLOR}"
# echo -e "${RED}[!] We'll go ahead anyway.${NOCOLOR}"
# echo " "
# sleep 3
Expand Down
14 changes: 7 additions & 7 deletions bin/bridges_add_obfs4
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ MENU_LIST_HEIGHT=$((NO_ITEMS+NO_SPACER))

#Colors
RED='\033[1;31m'
WHITE='\033[1;37m'
YELLOW='\033[1;93m'
NOCOLOR='\033[0m'

#Other variables
Expand Down Expand Up @@ -137,7 +137,7 @@ case "$CHOICE" in
fi
if [ "$bridge_address" = "-1" ]; then
echo " "
echo -e "${WHITE}[!] NETWORK ERROR!${NOCOLOR}"
echo -e "${YELLOW}[!] NETWORK ERROR!${NOCOLOR}"
echo -e "${RED}[+] Sorry, I couldn't fetch a bridge! Please, try again later or add bridges manually!${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
Expand All @@ -162,7 +162,7 @@ case "$CHOICE" in
n=0
for (( i=0; i<number_bridges; i++ ))
do
[ "$i" == "0" ] && echo -e "${WHITE}[!] Success! We fetched $number_bridges bridge(s)${NOCOLOR}"
[ "$i" == "0" ] && echo -e "${YELLOW}[!] Success! We fetched $number_bridges bridge(s)${NOCOLOR}"
n=$((n+1))
if grep -q "${bridge_address[$i]}" $TORRC ; then
echo -e "${RED}[+] Sorry, bridge number $n is already added!${NOCOLOR}"
Expand Down Expand Up @@ -190,8 +190,8 @@ case "$CHOICE" in
fi
else
echo ""
echo -e "${WHITE}[!] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${WHITE}[!] Can't fetch a bridge - ABORTING :( ${NOCOLOR}"
echo -e "${YELLOW}[!] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${YELLOW}[!] Can't fetch a bridge - ABORTING :( ${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
clear
Expand All @@ -209,7 +209,7 @@ case "$CHOICE" in
# exitstatus == 1 means that $number_bridges is not an integer
if [ "$exitstatus" == "1" ]; then
clear
echo -e "${WHITE}[!] WRONG INPUT - THIS IS NOT AN INTEGER!${NOCOLOR}"
echo -e "${YELLOW}[!] WRONG INPUT - THIS IS NOT AN INTEGER!${NOCOLOR}"
echo -e "${RED}[+] I asked you for a number and you gave me... what??? ${NOCOLOR}"
sleep 5
clear
Expand All @@ -226,7 +226,7 @@ case "$CHOICE" in
exit 0
fi
if grep -q "$bridge_address" $TORRC ; then
echo -e "${WHITE}[!] Bridge number $i is already added!${NOCOLOR}"
echo -e "${YELLOW}[!] Bridge number $i is already added!${NOCOLOR}"
sleep 3
i=$((i+1))
else
Expand Down
14 changes: 7 additions & 7 deletions bin/bridges_add_snowflake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ MENU_LIST_HEIGHT=$((NO_ITEMS+NO_SPACER))

#Colors
RED='\033[1;31m'
WHITE='\033[1;37m'
YELLOW='\033[1;93m'
NOCOLOR='\033[0m'

#Other variables
Expand Down Expand Up @@ -125,7 +125,7 @@ case "$CHOICE" in
fi
if [ "$bridge_address" = "-1" ]; then
echo " "
echo -e "${WHITE}[!] NETWORK ERROR!${NOCOLOR}"
echo -e "${YELLOW}[!] NETWORK ERROR!${NOCOLOR}"
echo -e "${RED}[+] Sorry, I couldn't fetch a bridge! Please, try again later or add bridges manually!${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
Expand Down Expand Up @@ -157,7 +157,7 @@ case "$CHOICE" in
n=0
for (( i=0; i<number_bridges; i++ ))
do
[ "$i" == "0" ] && echo -e "${WHITE}[!] Success! We fetched $number_bridges bridge(s)${NOCOLOR}"
[ "$i" == "0" ] && echo -e "${YELLOW}[!] Success! We fetched $number_bridges bridge(s)${NOCOLOR}"
n=$((n+1))
if grep -q "${bridge_address[$i]}" $TORRC ; then
echo -e "${RED}[+] Sorry, bridge number $n is already added!${NOCOLOR}"
Expand Down Expand Up @@ -199,8 +199,8 @@ case "$CHOICE" in
fi
else
echo ""
echo -e "${WHITE}[!] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${WHITE}[!] Can't fetch a bridge - ABORTING :( ${NOCOLOR}"
echo -e "${YELLOW}[!] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${YELLOW}[!] Can't fetch a bridge - ABORTING :( ${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
clear
Expand All @@ -218,7 +218,7 @@ case "$CHOICE" in
# exitstatus == 1 means that $number_bridges is not an integer
if [ "$exitstatus" == "1" ]; then
clear
echo -e "${WHITE}[!] WRONG INPUT - THIS IS NOT AN INTEGER!${NOCOLOR}"
echo -e "${YELLOW}[!] WRONG INPUT - THIS IS NOT AN INTEGER!${NOCOLOR}"
echo -e "${RED}[+] I asked you for a number and you gave me... what??? ${NOCOLOR}"
sleep 5
clear
Expand All @@ -235,7 +235,7 @@ case "$CHOICE" in
exit 0
fi
if grep -q "$bridge_address" $TORRC ; then
echo -e "${WHITE}[!] Bridge number $i is already added!${NOCOLOR}"
echo -e "${YELLOW}[!] Bridge number $i is already added!${NOCOLOR}"
sleep 3
i=$((i+1))
else
Expand Down
18 changes: 9 additions & 9 deletions bin/bridges_deactivate_obfs4
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ MENU_LIST_HEIGHT=$((NO_ITEMS+NO_SPACER))

#Colors
RED='\033[1;31m'
WHITE='\033[1;37m'
YELLOW='\033[1;93m'
NOCOLOR='\033[0m'

#Other variables
Expand Down Expand Up @@ -85,7 +85,7 @@ fi

if [ $number_configured_bridges_activated = 0 ]; then
clear
echo -e "${WHITE}[!] There are no activated OBFS4 bridges. ${NOCOLOR}"
echo -e "${YELLOW}[!] There are no activated OBFS4 bridges. ${NOCOLOR}"
echo -e "${RED}[+] You may use the menu entry \"Activate configured OBFS4 bridges...\". ${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
Expand Down Expand Up @@ -118,7 +118,7 @@ case "$CHOICE" in
clear
online_check $BRIDGE_DB_URL 0 1
if [ $OCHECK == 1 ]; then
echo -e "${WHITE}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo -e "${YELLOW}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo " "
echo -e "${RED}[+] Checking for bridges to deactivate - please wait...${NOCOLOR}"
trap break SIGINT
Expand Down Expand Up @@ -149,7 +149,7 @@ case "$CHOICE" in
trap "bash bridges_deactivate_obfs4; exit 0" SIGINT
if [ $j = 0 ]; then
echo " "
echo -e "${WHITE}[!] All checked OBFS4 do exist and are online -> nothing to deactivate!${NOCOLOR}"
echo -e "${YELLOW}[!] All checked OBFS4 do exist and are online -> nothing to deactivate!${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
clear
Expand All @@ -172,8 +172,8 @@ case "$CHOICE" in
fi
fi
else
echo -e "${WHITE}[+] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${WHITE}[+] Can't fetch the status of the bridges - ABORTING :( ${NOCOLOR}"
echo -e "${YELLOW}[+] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${YELLOW}[+] Can't fetch the status of the bridges - ABORTING :( ${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
clear
Expand All @@ -188,23 +188,23 @@ case "$CHOICE" in
clear
if [ $OCHECK == 1 ]; then
if (whiptail --title "TorBox - BRIDGE DEACTIVATION" --yesno "Do you want to see the ONLINE/OFFLINE status of the bridges?" $MENU_HEIGHT_10 $MENU_WIDTH_REDUX); then
echo -e "${WHITE}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo -e "${YELLOW}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo " "
sleep 2
STATUS=1
else
STATUS=0
fi
else
echo -e "${WHITE}[!] SORRY! - no connection with the bridge database${NOCOLOR}"
echo -e "${YELLOW}[!] SORRY! - no connection with the bridge database${NOCOLOR}"
echo -e "${RED}[!] We'll go ahead anyway.${NOCOLOR}"
echo " "
sleep 3
fi
number_of_obfs4_bridges
if [ "$number_configured_bridges_activated" == "0" ]; then
echo ""
echo -e "${WHITE}[!] There is no activated bridge, which can be deactivated!${NOCOLOR}"
echo -e "${YELLOW}[!] There is no activated bridge, which can be deactivated!${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
clear
Expand Down
14 changes: 7 additions & 7 deletions bin/bridges_remove_obfs4
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ MENU_LIST_HEIGHT=$((NO_ITEMS+NO_SPACER))

#Colors
RED='\033[1;31m'
WHITE='\033[1;37m'
YELLOW='\033[1;93m'
NOCOLOR='\033[0m'

#Other variables
Expand Down Expand Up @@ -124,7 +124,7 @@ case "$CHOICE" in
clear
online_check $BRIDGE_DB_URL 0 1
if [ $OCHECK == 1 ]; then
echo -e "${WHITE}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo -e "${YELLOW}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo " "
echo -e "${RED}[+] Checking for bridges to delete - please wait...${NOCOLOR}"
sudo cp ${TORRC} ${BAK}
Expand Down Expand Up @@ -174,7 +174,7 @@ case "$CHOICE" in
done
trap "bash bridges_remove_obfs4; exit 0" SIGINT
if [ $j = 0 ]; then
echo -e "${WHITE}[!] All checked OBFS4 do exist -> nothing to delete!${NOCOLOR}"
echo -e "${YELLOW}[!] All checked OBFS4 do exist -> nothing to delete!${NOCOLOR}"
sleep 5
clear
else
Expand All @@ -201,8 +201,8 @@ case "$CHOICE" in
fi
fi
else
echo -e "${WHITE}[+] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${WHITE}[+] Can't fetch the status of the bridges - ABORTING :( ${NOCOLOR}"
echo -e "${YELLOW}[+] OH NO! - no connection to the bridge database :( ${NOCOLOR}"
echo -e "${YELLOW}[+] Can't fetch the status of the bridges - ABORTING :( ${NOCOLOR}"
echo " "
read -n 1 -s -r -p "Press any key to continue"
clear
Expand All @@ -220,15 +220,15 @@ case "$CHOICE" in
clear
if [ $OCHECK == 1 ]; then
if (whiptail --title "TorBox - BRIDGE REMOVAL" --yesno "Do you want to see the ONLINE/OFFLINE status of the bridges?" $MENU_HEIGHT_10 $MENU_WIDTH_REDUX); then
echo -e "${WHITE}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo -e "${YELLOW}[+] OK - we are connected with the bridge database${NOCOLOR}"
echo " "
sleep 2
STATUS=1
else
STATUS=0
fi
else
echo -e "${WHITE}[!] SORRY! - no connection with the bridge database${NOCOLOR}"
echo -e "${YELLOW}[!] SORRY! - no connection with the bridge database${NOCOLOR}"
echo -e "${RED}[!] We'll go ahead anyway.${NOCOLOR}"
echo " "
sleep 3
Expand Down
Loading

0 comments on commit 7d8d7cb

Please sign in to comment.