Advertisement
SVERJPG

UDP DDoS Null Route script

Jan 15th, 2017
628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # Create databuckets
  4. Phase1=/tmp/DDOS.log; touch $Phase1
  5. Phase2=/root/DDOS_IP.log; touch $Phase2
  6.  
  7. # Extract IP addresses
  8. cat /var/log/syslog | grep "UDP: bad checksum" | sed 's/:/ /g' | awk {'print $13'} >> $Phase1
  9.  
  10. cat $Phase1 | sort --unique >> $Phase2
  11.  
  12. # Null route
  13. for i in $( cat $Phase2 ); do
  14. ip route add $i via 127.0.0.1; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement