loading...

Find all ip addresses in a project

bugb profile image bugb ・1 min read

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

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}" .

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}" .

Discussion

pic
Editor guide