DEV Community

bugb
bugb Subscriber

Posted on

1 3

Find all ip addresses in a project

When doing a task about migration server for a project, my first thing to do is find what these external API endpoint (usually it comes with ip address like

10.10.0.1
123.123.123.123
Enter fullscreen mode Exit fullscreen mode

To find all ip address in a project we can use grep command from root project directory:

 grep -r -oE "([0-9]{1,3}\.){3}[0-9]{1,3}" .
Enter fullscreen mode Exit fullscreen mode

You can also exclude directory when using grep, example:

 grep -r --exclude-dir=node_modules -oE "([0-9]{1,3}\.){3}[0-9]{1,3}" .
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay