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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more