Created
January 19, 2012 12:29
-
-
Save brokendish/1639814 to your computer and use it in GitHub Desktop.
IPアドレスの国を判別する(コマンド)
This file contains 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
grep 'Invalid user' /var/log/auth.log|awk 'BEGIN{FS=":"}{print $4}'|awk 'BEGIN{FS=" "}{print $5}'|sort|uniq|xargs -I{} whois {}|grep -i country|sed 's/ //g'|sort|uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment