I wanted to use every Private Internet Access (PIA) IPs to run a script using each of their full list of IP addresses once.
For other companies, copy and paste a list of their whole network addresses list. For PIA, they
First, save a copy of all their servers names. For PIA I had to expand each section and then copy and paste all of the html into a text document or spreadsheet.
When pasting into a spreadsheet, make sure to right click and select paste special and then unformatted text.
We want only the hostnames, so copy the column containing all the URLs and use the remove lines not containing tool to remove lines not containing:
Save this list somewhere (doc/txt files).
Now use the prefix & suffix lines tool to prefix each line with
and suffix each line with
This will add each of the results of ‘host xxx.com’ to a file called ip-list. We use >> instead of > as a double right arrow adds the output to the file whereas a single right arrow will overwrite it.
Paste everything into a terminal and when it’s finished you should have a file with all of the IP addresses.
To clean the file up, find and replace ‘has address ‘ with a tab.
Paste this into a spreadsheet and you will have a column with all of the IP addresses.