Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IPアドレスの国を判別する(コマンド)
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
You can’t perform that action at this time.