To perform a bulk whois lookup of a list of IP addresses use the following script:

Bulk whois lookup

while read ip; do if [ ! -z "$ip" ]; then echo -n "$ip - " && whois $ip 2>/dev/null grep "Organization" -m 1; fi; done < ip_list.txt

Example input (ip_list.txt)

172.217.8.206
172.217.8.203
172.217.8.266
151.101.65.67

Output

172.217.8.206 - Organization:   Google LLC (GOGL)
172.217.8.203 - Organization:   Google LLC (GOGL)
172.217.8.266 - 98.138.219.231 - Organization:   Oath Holdings Inc. (OH-207)
151.101.65.67 - Organization:   Fastly (SKYCA-3)
Last modified: September 18, 2019

Author

Comments

Write a Reply or Comment

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

This site uses Akismet to reduce spam. Learn how your comment data is processed.