fix: Remove /dev/tty redirects from all read statements - use terminal detection instead
This commit is contained in:
+12
-12
@@ -56,7 +56,7 @@ run_module() {
|
||||
echo ""
|
||||
echo -e "${RED}✗ Module not found: $category/$module${NC}"
|
||||
echo ""
|
||||
read -p "Press Enter to continue..." < /dev/tty
|
||||
read -p "Press Enter to continue..."
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -77,7 +77,7 @@ run_module() {
|
||||
echo -e "${RED}✗ Exited with code: $exit_code${NC}"
|
||||
fi
|
||||
echo ""
|
||||
read -p "Press Enter to continue..." < /dev/tty
|
||||
read -p "Press Enter to continue..."
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
@@ -214,7 +214,7 @@ show_threat_analysis_menu() {
|
||||
handle_threat_analysis_menu() {
|
||||
while true; do
|
||||
show_threat_analysis_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) run_module "security" "bot-analyzer.sh" ;;
|
||||
@@ -248,7 +248,7 @@ show_live_monitoring_menu() {
|
||||
handle_live_monitoring_menu() {
|
||||
while true; do
|
||||
show_live_monitoring_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) run_module "security" "live-attack-monitor.sh" ;;
|
||||
@@ -280,7 +280,7 @@ show_log_viewers_menu() {
|
||||
handle_log_viewers_menu() {
|
||||
while true; do
|
||||
show_log_viewers_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) run_module "security" "tail-apache-access.sh" ;;
|
||||
@@ -311,7 +311,7 @@ show_security_actions_menu() {
|
||||
handle_security_actions_menu() {
|
||||
while true; do
|
||||
show_security_actions_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) run_module "security" "enable-cphulk.sh" ;;
|
||||
@@ -345,7 +345,7 @@ show_security_menu() {
|
||||
handle_security_menu() {
|
||||
while true; do
|
||||
show_security_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) handle_threat_analysis_menu ;;
|
||||
@@ -393,7 +393,7 @@ show_website_menu() {
|
||||
handle_website_menu() {
|
||||
while true; do
|
||||
show_website_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) run_module "website" "website-error-analyzer.sh" ;;
|
||||
@@ -446,7 +446,7 @@ show_performance_menu() {
|
||||
handle_performance_menu() {
|
||||
while true; do
|
||||
show_performance_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) run_module "performance" "mysql-query-analyzer.sh" ;;
|
||||
@@ -552,7 +552,7 @@ show_acronis_menu() {
|
||||
handle_backup_menu() {
|
||||
while true; do
|
||||
show_backup_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) handle_acronis_menu ;;
|
||||
@@ -567,7 +567,7 @@ handle_backup_menu() {
|
||||
handle_acronis_menu() {
|
||||
while true; do
|
||||
show_acronis_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) run_module "backup" "acronis-install.sh" ;;
|
||||
@@ -621,7 +621,7 @@ show_email_menu() {
|
||||
handle_email_menu() {
|
||||
while true; do
|
||||
show_email_menu
|
||||
read -r choice < /dev/tty
|
||||
read -r choice
|
||||
|
||||
case $choice in
|
||||
1) run_module "email" "email-diagnostics.sh" ;;
|
||||
|
||||
Reference in New Issue
Block a user