diff --git a/modules/security/malware-scanner.sh b/modules/security/malware-scanner.sh index 8594104..25d63bf 100755 --- a/modules/security/malware-scanner.sh +++ b/modules/security/malware-scanner.sh @@ -8,6 +8,14 @@ # Scan scope: Single domain, user account, or entire server ################################################################################ +# Color definitions (matching launcher.sh) +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +CYAN='\033[0;36m' +BOLD='\033[1m' +NC='\033[0m' + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" # Source required libraries (warn if missing, but allow graceful degradation) @@ -32,6 +40,7 @@ validate_required_functions() { local required_functions=( "confirm" "print_header" + "print_banner" "select_user_interactive" "get_user_domains" ) @@ -819,10 +828,51 @@ else fi fi +# If no scanners found, show installation guide and exit gracefully if [ ${#AVAILABLE_SCANNERS[@]} -eq 0 ]; then - log_message "ERROR: No scanners found!" + log_message "WARNING: No scanners found on this system" + echo "" echo -e "${RED}No malware scanners detected!${NC}" - exit 1 + echo "" + echo -e "${YELLOW}Available Malware Scanners:${NC}" + echo "" + + echo -e "${CYAN}ImunifyAV${NC} - FREE real-time malware scanner" + echo " Status: Not installed" + echo " Installation (cPanel):" + echo " yum install imunify-antivirus imunify-antivirus-cpanel" + echo " /opt/alt/python35/share/imunify360/scripts/av-userside-plugin.sh" + echo " Installation (manual):" + echo " wget https://repo.imunify360.cloudlinux.com/defence360/imav-deploy.sh" + echo " bash imav-deploy.sh" + echo " Docs: https://docs.imunify360.com/imunifyav/" + echo "" + + echo -e "${CYAN}ClamAV${NC} - Open source antivirus engine" + echo " Status: Not installed" + echo " Installation:" + echo " yum install clamav clamav-update # RHEL/CentOS" + echo " apt-get install clamav clamav-daemon # Debian/Ubuntu" + echo "" + + echo -e "${CYAN}Maldet (LMD)${NC} - Linux Malware Detect" + echo " Status: Not installed" + echo " Installation:" + echo " cd /tmp && wget http://www.rfxn.com/downloads/maldetect-current.tar.gz" + echo " tar -xzf maldetect-current.tar.gz && cd maldetect-*" + echo " ./install.sh" + echo "" + + echo -e "${CYAN}Rootkit Hunter${NC} - Rootkit/backdoor/exploit scanner" + echo " Status: Not installed" + echo " Installation:" + echo " yum install epel-release rkhunter # RHEL/CentOS" + echo " apt-get install rkhunter # Debian/Ubuntu" + echo "" + + echo -e "${YELLOW}Recommendation:${NC} Install at least ClamAV + RKHunter (both free)" + echo "" + exit 0 fi log_message "Found ${#AVAILABLE_SCANNERS[@]} scanner(s): ${AVAILABLE_SCANNERS[*]}"