Advertisement
Guest User

Suricate Alert

a guest
Jul 18th, 2020
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1. #!/bin/bash
  2. fastlog=$(cat /var/log/suricata/fast.log)
  3.  
  4. while true
  5. do
  6. fastlogtmp=$(cat /var/log/suricata/fast.log)
  7. if [[ "$fastlog" == "$fastlogtmp" ]]; then
  8.    sleep 1
  9. else
  10.         echo 'Alert !'
  11.         echo
  12.         cat /var/log/suricata/fast.log
  13.         echo
  14.         echo '#############################################'
  15.         echo
  16.         paplay /usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga & zenity --info --width=250 --height=50 --text "Suricata Attack notification!"
  17.         fastlog=$(cat /var/log/suricata/fast.log)
  18. fi
  19. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement