Last active
October 15, 2021 08:05
-
-
Save michelep/5bd8f709e8aa02638c3a4ffe7731a777 to your computer and use it in GitHub Desktop.
GreyNoise check for outbound connection
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
sudo netstat -anp TCP | grep ESTAB | grep -v "127.0.0.1" | grep -E -o "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" | grep -v "$192\.\|10\." | sort -u | while read ip;do curl https://api.greynoise.io/v3/community/$ip; echo; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment