diff --git a/modules/security/malware-scanner.sh b/modules/security/malware-scanner.sh index 44350cc..4e65d81 100755 --- a/modules/security/malware-scanner.sh +++ b/modules/security/malware-scanner.sh @@ -1231,6 +1231,9 @@ CYAN='\033[0;36m' BOLD='\033[1m' NC='\033[0m' +# MALDET_ONLY mode (injected from parent shell - for dedicated Maldet menu) +MALDET_ONLY="PLACEHOLDER_MALDET_ONLY" + # Detect control panel (for IP reputation tracking) if [ -z "$CONTROL_PANEL" ]; then if [ -f "/usr/local/cpanel/version" ]; then @@ -2329,6 +2332,13 @@ STANDALONE_EOF return 1 fi + # Inject MALDET_ONLY flag for Maldet-dedicated scans + local maldet_flag="${MALDET_ONLY:-0}" + if ! sed -i "s|PLACEHOLDER_MALDET_ONLY|$maldet_flag|" "$session_dir/scan.sh"; then + echo -e "${RED}ERROR: Failed to inject MALDET_ONLY flag${NC}" + return 1 + fi + # Make executable chmod +x "$session_dir/scan.sh"