Omega Owners Forum
Chat Area => General Discussion Area => Topic started by: tunnie 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.
-
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
#!/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...
-
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)
-
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 ::)
-
I think we need a foreign language sub forum ;)
-
:y
-
I think we need a foreign language sub forum ;)
You mean a superior language sub forum? ;) ;D
-
I can think of a number of adjectives but superior is not one of them ;) ;D