diff --git a/tools/analyze-historical-attacks.sh b/tools/analyze-historical-attacks.sh index 0c446ef..2330dc5 100755 --- a/tools/analyze-historical-attacks.sh +++ b/tools/analyze-historical-attacks.sh @@ -25,6 +25,10 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." # Source required libraries +source "$SCRIPT_DIR/lib/common-functions.sh" 2>/dev/null || { + echo "ERROR: common-functions.sh not found" + exit 1 +} source "$SCRIPT_DIR/lib/attack-signatures.sh" 2>/dev/null || { echo "ERROR: attack-signatures.sh not found" exit 1 @@ -167,17 +171,7 @@ declare -A IP_SAMPLE_URLS # Sample URLs per IP declare -a ATTACK_TYPES_RAW declare -a SIGNATURE_HITS_RAW -# Progress indicator -show_progress() { - count=$1 - total=$2 - if [ "$total" = "unknown" ] || [ "$total" -eq 0 ] 2>/dev/null; then - echo -ne "\r${BLUE}[*]${NC} Processing: $count lines... " - else - percent=$((count * 100 / total)) - echo -ne "\r${BLUE}[*]${NC} Processing: $count/$total lines ($percent%) " - fi -} +# Progress indicator function now sourced from common-functions.sh # Start analysis echo ""