Skip to content

Instantly share code, notes, and snippets.

@lajunta
Last active February 28, 2020 17:02
Show Gist options
  • Save lajunta/7315509 to your computer and use it in GitHub Desktop.
Save lajunta/7315509 to your computer and use it in GitHub Desktop.
check ddos ip
netstat -an|grep ESTABLISHED|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|awk '{ printf("%s\t%s\t",$2,$1); for (i = 0; i < $1; i++) {printf("*")}; print ""}'
netstat -alpn | grep :80 | awk '{print $5}' |awk -F: '{print $(NF-1)}' |sort | uniq -c | sort -n
netstat -anp |grep ‘tcp\|udp’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort –n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment