diff --git a/modules/security/malware-scanner.sh b/modules/security/malware-scanner.sh index 219d237..73b3087 100755 --- a/modules/security/malware-scanner.sh +++ b/modules/security/malware-scanner.sh @@ -408,13 +408,29 @@ install_all_scanners() { # Check if installation succeeded if is_maldet_installed; then - echo -e "${GREEN}✓ Maldet installed${NC}" + # Verify we have version 2.0 or newer + local maldet_bin=$(command -v maldet || find /usr/local -name maldet -type f 2>/dev/null | head -1) + local maldet_version="" + if [ -n "$maldet_bin" ]; then + maldet_version=$("$maldet_bin" -v 2>/dev/null | grep -oE '[0-9]+\.[0-9]+' | head -1) + fi + + # Check version is 2.0 or newer + if [ -n "$maldet_version" ]; then + local major_version=$(echo "$maldet_version" | cut -d. -f1) + if [ "$major_version" -lt 2 ]; then + echo -e "${YELLOW}⚠ Warning: Maldet version $maldet_version installed (2.0+ recommended for performance)${NC}" + else + echo -e "${GREEN}✓${NC} Maldet $maldet_version installed (2.0+ performance optimizations)" + fi + else + echo -e "${GREEN}✓ Maldet installed${NC}" + fi + rm -f "$install_log" # Update malware signatures immediately with timeout echo " → Updating malware signatures..." - # Try to find maldet binary (might not be in PATH yet) - local maldet_bin=$(command -v maldet || find /usr/local -name maldet -type f 2>/dev/null | head -1) if [ -n "$maldet_bin" ]; then if timeout 120 "$maldet_bin" -u 2>&1 | grep -qE "update completed|signatures"; then echo -e " ${GREEN}✓${NC} Signatures updated"