Fix: Maldet menu now runs ONLY Maldet, not all scanners
Issue: Selecting scan from Maldet menu ran all available scanners (ImunifyAV, Maldet, RKHunter) instead of just Maldet Root cause: Variable case mismatch - code checked AVAILABLE_SCANNERS (uppercase) but actual array was available_scanners (lowercase). So MALDET_ONLY filter never worked. Solution: - Fixed variable names to lowercase throughout - MALDET_ONLY flag now properly filters to Maldet-only - Changed exit to return (for sourced function) Now Maldet menu only uses Maldet, multi-scanner mode is separate.
This commit is contained in:
@@ -1480,16 +1480,17 @@ 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 "Running Maldet-only scan (fastest, Linux-focused)"
|
||||
echo ""
|
||||
# Check if Maldet is available
|
||||
if [[ " ${AVAILABLE_SCANNERS[@]} " =~ " maldet " ]]; then
|
||||
AVAILABLE_SCANNERS=("maldet")
|
||||
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
|
||||
read -p "Press Enter to continue..." < /dev/tty 2>/dev/null || true
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user