Bulk Lookup Owner of IP Address

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)

1 comment to Bulk Lookup Owner of IP Address

Leave a Reply

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

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>