Background
Very often I have need for fast search, deduplicate and sort IP addresses in data from different sources: pdf reports, articles, logs.
This should include addresses which are written in safe format, with dots in brackets, like:
This should include addresses which are written in safe format, with dots in brackets, like:
- 192.168.0[.]1
- 192.168.0(.)1
This is no problem when you have log with ~10 addresses or so, but if you have log file with ~50k - ~100k this could be a problem.
Solution
The function named Search-IP (link do Github repository) which was written in PowerShell.
How it works
There is diagram below which showing how function works divided into 3 steps:
- Input,
- Working,
- Output