Last active
October 30, 2018 09:59
-
-
Save hoangdh/efae37bc983f06c513ee04603cf3d28a to your computer and use it in GitHub Desktop.
Trace IP SYN Flood to country
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#### | |
# | |
# Count IP send SYN's flag | |
# | |
#### | |
list=`netstat -npt | grep SYN_RECV | awk {'print $5'} | cut -d':' -f1`; | |
for x in $list; | |
do | |
country=`curl -s ipinfo.io/$x| grep -w 'country'`; | |
echo "$x - $country"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment