Omega Owners Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Search the maintenance guides for answers to 99.999% of Omega questions

Pages: [1]   Go Down

Author Topic: sorry work releated question....  (Read 763 times)

0 Members and 1 Guest are viewing this topic.

tunnie

  • Get A Life!!
  • *****
  • Offline Offline
  • Gender: Male
  • Surrey
  • Posts: 37588
    • Zafira Tourer & BMW 435i
    • View Profile
sorry work releated question....
« on: 30 July 2008, 11:22:56 »

... does anyone know of a decent bulk IP whois lookup service?

I am going to have a huge list of gateways which i need to look up, to find the carrier they came from.

Last time it was limited numbers and i just did a manual request on linux box, but don't really wanna do that 200 times.
Logged

PaulW

  • Omega Knight
  • *****
  • Offline Offline
  • Gender: Male
  • Somewhere near Manchester
  • Posts: 1769
  • Come on you fiend!
    • Some crappy Insignia
    • View Profile
Re: sorry work releated question....
« Reply #1 on: 30 July 2008, 11:35:36 »

you still have access to a linux box??  if so, export the IP addresses into a file (one per line), and then create the following bash script
whois_bulk.sh
Code: [Select]
#!/bin/bash
for i in `cat $1`
do
  whois $i > whois_$i
done

set the file to executable (chmod +x whois_bulk.sh) and then run it
./whois_bulk.sh inputiplist.txt

it will create a seperate whois for each IP address (whois_xx.xx.xx.xx), and so-on...
« Last Edit: 30 July 2008, 11:35:55 by PaulW »
Logged
Humbugs...

PaulW

  • Omega Knight
  • *****
  • Offline Offline
  • Gender: Male
  • Somewhere near Manchester
  • Posts: 1769
  • Come on you fiend!
    • Some crappy Insignia
    • View Profile
Re: sorry work releated question....
« Reply #2 on: 30 July 2008, 11:38:27 »

also, if you want to stop the whois servers going haywire, after the line

whois $1 > $whois_$i

put

sleep 2

to make it wait 2 seconds (increase/decrease as required)

Also, if you want certain parts, grep the output (if you just want descr tags)

whois $1 | grep descr > $whois_$i

will return:

gsi ~ # whois 217.155.56.220 | grep descr
descr:        Mr Jaime Lett
descr:        ADSL
descr:        Zen Internet Ltd

(although i called that straight from console, the output will be the same in the result files)
« Last Edit: 30 July 2008, 11:41:36 by PaulW »
Logged
Humbugs...

tunnie

  • Get A Life!!
  • *****
  • Offline Offline
  • Gender: Male
  • Surrey
  • Posts: 37588
    • Zafira Tourer & BMW 435i
    • View Profile
Re: sorry work releated question....
« Reply #3 on: 30 July 2008, 11:40:53 »

cheers, that looks like a neat way to do it.

Might have to put the sleep in there, most of our boxes are blacklisted from whois  ::)
Logged

ians

  • Omega Baron
  • *****
  • Offline Offline
  • Reading
  • Posts: 3394
    • View Profile
Re: sorry work releated question....
« Reply #4 on: 30 July 2008, 11:40:57 »

I think we need a foreign language sub forum ;)
Logged

PaulW

  • Omega Knight
  • *****
  • Offline Offline
  • Gender: Male
  • Somewhere near Manchester
  • Posts: 1769
  • Come on you fiend!
    • Some crappy Insignia
    • View Profile
Re: sorry work releated question....
« Reply #5 on: 30 July 2008, 11:42:17 »

 :y
Logged
Humbugs...

tunnie

  • Get A Life!!
  • *****
  • Offline Offline
  • Gender: Male
  • Surrey
  • Posts: 37588
    • Zafira Tourer & BMW 435i
    • View Profile
Re: sorry work releated question....
« Reply #6 on: 30 July 2008, 11:44:50 »

Quote
I think we need a foreign language sub forum ;)

You mean a superior language sub forum?  ;)  ;D
Logged

ians

  • Omega Baron
  • *****
  • Offline Offline
  • Reading
  • Posts: 3394
    • View Profile
Re: sorry work releated question....
« Reply #7 on: 30 July 2008, 11:54:05 »

I can think of a number of adjectives but superior is not one of them ;) ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 17 queries.