diff --git a/modules/security/malware-scanner.sh b/modules/security/malware-scanner.sh index 6ebd605..ef69f58 100755 --- a/modules/security/malware-scanner.sh +++ b/modules/security/malware-scanner.sh @@ -1144,6 +1144,22 @@ else fi fi +# Filter scanners if MALDET_ONLY is set (for Maldet-specific menu) +if [ "${MALDET_ONLY:-0}" = "1" ]; then + log_message "Maldet-only mode enabled" + echo "🔍 Running Maldet-only scan (fastest, Linux-focused)" + echo "" + # Check if Maldet is available + if [[ " ${AVAILABLE_SCANNERS[@]} " =~ " maldet " ]]; then + AVAILABLE_SCANNERS=("maldet") + log_message "Filtered to Maldet only" + else + log_message "ERROR: Maldet not installed but MALDET_ONLY was set" + echo -e "${RED}ERROR: Maldet is not installed${NC}" + exit 1 + fi +fi + # If no scanners found, show installation guide and exit gracefully if [ ${#AVAILABLE_SCANNERS[@]} -eq 0 ]; then log_message "WARNING: No scanners found on this system"