Advertisement
lllANONYMOUSlll

AutoDump.sh

Jan 3rd, 2021
2,473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. interface=eth0
  2. dumpdir=/root/dumps
  3.  
  4. while /bin/true; do
  5.   pkt_old=`grep $interface: /proc/net/dev | cut -d :  -f2 | awk '{ print $2 }'`
  6.   sleep 1
  7.   pkt_new=`grep $interface: /proc/net/dev | cut -d :  -f2 | awk '{ print $2 }'`
  8.  
  9.   pkt=$(( $pkt_new - $pkt_old ))
  10.   echo -ne "\r$pkt packets/s\033[0K"
  11.  
  12.   if [ $pkt -gt 10000 ]; then
  13.     echo -e "\n`date` Under Attack. Capturing..."
  14.     pktname="dump_`date +%d-%m-%y_%H:%M:%S`.pcap"
  15.     tcpdump -i $interface -t -w $dumpdir/dump_`date +%d-%m-%y_%H:%M:%S`.pcap -c 10000
  16.     echo "`date` Packets Captured. Sleeping..."
  17.     ./discord.sh \
  18. --webhook-url="https://discord.com/api/webhooks/790958005800665158/kjvHJjToHjNMuxQwofIMszlcQ3e1wMhgL6Z5Txu-Yu2BGm6gGtMPfsZsYepI2JPnZdIZ" \
  19. --username "ParadoxVPN Server Monitor" \
  20. --title "Attack Monitor" \
  21. --description "A DDoS attack on server **OVH MAIN CA** has managed to bypass ovh's vac and the attack has been logged and will be investigated soon.\n\n**Capture Name:** $pktname\n**Capture Location:** $dumpdir\n**Attack PPS:** $pkt\n\n**Server IP:** ||:/||" \
  22. --color "0x700D06" \
  23. --url "https://status.paradoxvpn.com" \
  24. --thumbnail "https://i.imgur.com/ifR053m.png" \
  25. --author "Server Monitor" \
  26. --author-url "https://status.paradoxvpn.com" \
  27. --author-icon "https://i.imgur.com/uxQ36sv.png" \
  28. --image "https://imgur.com/RPb7G2N.png" \
  29. --footer "Server Attack Monitor" \
  30. --footer-icon "https://img.pngio.com/warning-icon-png-321332-free-icons-library-warning-icon-png-2400_2400.jpg" \
  31. --text "Look below for the attack details." \
  32. --timestamp
  33.  
  34. sleep 300
  35. fi
  36. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement