Add consolidated scanner results summary at end of scan

Added comprehensive summary table showing what each scanner found,
making it easy to see all results at a glance.

New Summary Section:
- Consolidated results table for all scanners
- Shows counts: threats, infected files, warnings
- Formatted table with aligned columns
- Scanner-specific result types
- Log file locations for detailed review

Example Output:
  SCANNER RESULTS SUMMARY:
  ----------------------------------------
  ImunifyAV:           2 threats detected
  ClamAV:              0 infected files
  Maldet:              Scan complete (check logs)
  Rootkit Hunter:      3 warnings
  ----------------------------------------

Improvements:
- Quick overview without reading all logs
- Clear indication if threats found
- Easy comparison across scanners
- Shows which scanners ran
- Provides log paths for deeper investigation

Clean presentation with:
- ✓ checkmark for clean scans
- ⚠️  warning icon for infected files
- Action-oriented messaging
- Helpful next steps
This commit is contained in:
cschantz
2025-11-11 21:45:43 -05:00
parent f94bd5466c
commit a906a149e8
+41 -4
View File
@@ -740,7 +740,7 @@ for scanner in "${AVAILABLE_SCANNERS[@]}"; do
fi
done
# Finalize report
# Finalize report with consolidated summary
{
echo "=========================================="
echo "Scan Session Complete"
@@ -748,13 +748,50 @@ done
echo "=========================================="
echo ""
# Consolidated Scanner Results Table
echo "SCANNER RESULTS SUMMARY:"
echo "----------------------------------------"
# ImunifyAV results
if echo "${AVAILABLE_SCANNERS[*]}" | grep -q "imunify"; then
IMUNIFY_COUNT=$(grep -o "ImunifyAV scan complete - Found: [0-9]*" "$SUMMARY_FILE" | grep -o "[0-9]*$" || echo "N/A")
printf "%-20s %s\n" "ImunifyAV:" "$IMUNIFY_COUNT threats detected"
fi
# ClamAV results
if echo "${AVAILABLE_SCANNERS[*]}" | grep -q "clamav"; then
CLAM_COUNT=$(grep -o "ClamAV scan complete - Found: [0-9]*" "$SUMMARY_FILE" | grep -o "[0-9]*$" || echo "N/A")
printf "%-20s %s\n" "ClamAV:" "$CLAM_COUNT infected files"
fi
# Maldet results
if echo "${AVAILABLE_SCANNERS[*]}" | grep -q "maldet"; then
printf "%-20s %s\n" "Maldet:" "Scan complete (check logs)"
fi
# RKHunter results
if echo "${AVAILABLE_SCANNERS[*]}" | grep -q "rkhunter"; then
RKH_COUNT=$(grep -o "RKHunter scan complete - Warnings: [0-9]*" "$SUMMARY_FILE" | grep -o "[0-9]*$" || echo "N/A")
printf "%-20s %s\n" "Rootkit Hunter:" "$RKH_COUNT warnings"
fi
echo "----------------------------------------"
echo ""
if [ -f "$INFECTED_LIST" ] && [ -s "$INFECTED_LIST" ]; then
echo "INFECTED FILES DETECTED:"
echo "⚠️ INFECTED FILES DETECTED:"
echo ""
sort -u "$INFECTED_LIST"
echo ""
echo "ACTION REQUIRED: Review and quarantine/remove infected files"
else
echo "No infected files detected by automated scan."
echo "Review individual scanner logs for details."
echo "No infected files detected by automated scan."
echo ""
echo "Review individual scanner logs for detailed information:"
echo " • ImunifyAV: $LOG_DIR/imunify.log"
echo " • ClamAV: $LOG_DIR/clamav.log"
echo " • Maldet: $LOG_DIR/maldet.log"
echo " • RKHunter: $LOG_DIR/rkhunter.log"
fi
} >> "$SUMMARY_FILE"