From 701bc76de141e1c813bc76c38d51fe9bc4f893cd Mon Sep 17 00:00:00 2001 From: cschantz Date: Thu, 5 Feb 2026 20:50:48 -0500 Subject: [PATCH] Fix: Move Historical Attack Analysis to Threat Analysis menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: Historical Attack Analysis was in its own "System Diagnostics" category with only one tool, but it's actually threat analysis. Changes: - Added Historical Attack Analysis to Threat Analysis menu (option 6) - Removed System Diagnostics sub-menu entirely (both functions) - Updated main security menu from 5 to 4 categories - Removed option 5 and its handler New Structure: Main Security Menu (4 categories): 1) Threat Analysis (6 tools) ← Historical Attack Analysis moved here 2) Live Monitoring (4 tools) 3) Log Viewers (4 tools) 4) Security Actions (3 tools) Benefits: - More logical grouping - analyzing attacks is threat analysis - No orphan category with only one tool - Cleaner main menu (4 options vs 5) Code Changes: - Added: +2 lines (option 6 in show/handle) - Removed: -30 lines (System Diagnostics menu) - Net: -28 lines Co-Authored-By: Claude Sonnet 4.5 --- launcher.sh | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/launcher.sh b/launcher.sh index 9bc01cf..bd13ba5 100755 --- a/launcher.sh +++ b/launcher.sh @@ -124,6 +124,7 @@ show_threat_analysis_menu() { echo -e " ${CYAN}3)${NC} 📊 IP Reputation Manager - Query/manage IP database" echo -e " ${CYAN}4)${NC} 🔐 Suspicious Login Monitor - SSH/Panel login analysis" echo -e " ${CYAN}5)${NC} 🦠 Malware Scanner - ImunifyAV, ClamAV, Maldet" + echo -e " ${CYAN}6)${NC} 🛡️ Historical Attack Analysis - Scan past logs (ET Open)" echo "" echo -e " ${RED}0)${NC} Back to Security Menu" echo "" @@ -142,6 +143,7 @@ handle_threat_analysis_menu() { 3) run_module "security" "ip-reputation-manager.sh" ;; 4) run_module "security" "suspicious-login-monitor.sh" ;; 5) run_module "security" "malware-scanner.sh" ;; + 6) bash "$BASE_DIR/tools/analyze-historical-attacks.sh" ;; 0) return ;; *) echo -e "${RED}Invalid option${NC}"; sleep 1 ;; esac @@ -242,32 +244,6 @@ handle_security_actions_menu() { done } -# System Diagnostics Sub-Menu -show_system_diagnostics_menu() { - show_banner - echo -e "${GREEN}${BOLD}🛠️ System Diagnostics${NC}" - echo "" - echo -e " ${GREEN}1)${NC} 🛡️ Historical Attack Analysis - Scan past logs (ET Open)" - echo "" - echo -e " ${RED}0)${NC} Back to Security Menu" - echo "" - echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}" - echo -n "Select option: " -} - -handle_system_diagnostics_menu() { - while true; do - show_system_diagnostics_menu - read -r choice - - case $choice in - 1) bash "$BASE_DIR/tools/analyze-historical-attacks.sh" ;; - 0) return ;; - *) echo -e "${RED}Invalid option${NC}"; sleep 1 ;; - esac - done -} - ############################################################################# # MAIN SECURITY MENU ############################################################################# @@ -280,7 +256,6 @@ show_security_menu() { echo -e " ${MAGENTA}2)${NC} 🔴 Live Monitoring → Real-time attack detection" echo -e " ${BLUE}3)${NC} 📋 Log Viewers → Tail system/security logs" echo -e " ${YELLOW}4)${NC} 🔒 Security Actions → Hardening & protection" - echo -e " ${GREEN}5)${NC} 🛠️ System Diagnostics → Analyze past attacks" echo "" echo -e " ${RED}0)${NC} Back to Main Menu" echo "" @@ -298,7 +273,6 @@ handle_security_menu() { 2) handle_live_monitoring_menu ;; 3) handle_log_viewers_menu ;; 4) handle_security_actions_menu ;; - 5) handle_system_diagnostics_menu ;; 0) return ;; *) echo -e "${RED}Invalid option${NC}"; sleep 1 ;; esac