Auto-generate client report at scan completion
Enhancement: Automatically create client report when scan finishes
Changes:
- Client report is now auto-generated at end of every scan
- Report location prominently displayed in completion summary
- Added helpful tip showing exact cat command to view report
Before (old output):
Results saved to:
Summary: /opt/malware-.../results/summary.txt
Logs: /opt/malware-.../logs/
After (new output):
Results saved to:
Summary: /opt/malware-.../results/summary.txt
Logs: /opt/malware-.../logs/
Client Report (copy/paste for tickets):
/opt/malware-.../results/client_report.txt
TIP: To view the client-friendly report:
cat /opt/malware-.../results/client_report.txt
Workflow Improvement:
- No need to remember to generate report manually
- Client report always available immediately after scan
- Clear instructions on how to access it
- Report ready to copy/paste into support tickets
This makes it much easier to quickly grab the client-facing
report without navigating through menus or remembering commands.
This commit is contained in:
@@ -1399,6 +1399,10 @@ else
|
|||||||
echo "⚠️ Scan Validation: $validation_issues issue(s) found - review logs" >> "$SUMMARY_FILE"
|
echo "⚠️ Scan Validation: $validation_issues issue(s) found - review logs" >> "$SUMMARY_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Generate client report automatically
|
||||||
|
log_message "Generating client-facing security report"
|
||||||
|
generate_client_report "$SCAN_DIR" > /dev/null 2>&1
|
||||||
|
|
||||||
# Display completion
|
# Display completion
|
||||||
clear
|
clear
|
||||||
echo "=========================================="
|
echo "=========================================="
|
||||||
@@ -1411,6 +1415,9 @@ echo "Results saved to:"
|
|||||||
echo " Summary: $SUMMARY_FILE"
|
echo " Summary: $SUMMARY_FILE"
|
||||||
echo " Logs: $LOG_DIR/"
|
echo " Logs: $LOG_DIR/"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo -e "${CYAN}Client Report (copy/paste for tickets):${NC}"
|
||||||
|
echo " $RESULTS_DIR/client_report.txt"
|
||||||
|
echo ""
|
||||||
|
|
||||||
# Show summary
|
# Show summary
|
||||||
cat "$SUMMARY_FILE"
|
cat "$SUMMARY_FILE"
|
||||||
@@ -1418,6 +1425,9 @@ cat "$SUMMARY_FILE"
|
|||||||
echo ""
|
echo ""
|
||||||
echo "=========================================="
|
echo "=========================================="
|
||||||
echo ""
|
echo ""
|
||||||
|
echo -e "${CYAN}TIP:${NC} To view the client-friendly report:"
|
||||||
|
echo " cat $RESULTS_DIR/client_report.txt"
|
||||||
|
echo ""
|
||||||
|
|
||||||
# Prompt for cleanup (RKHunter cleanup handled by trap)
|
# Prompt for cleanup (RKHunter cleanup handled by trap)
|
||||||
read -p "Delete scan script? (Logs and results will be preserved) (yes/no): " cleanup_choice
|
read -p "Delete scan script? (Logs and results will be preserved) (yes/no): " cleanup_choice
|
||||||
|
|||||||
Reference in New Issue
Block a user