Checking a list of IPs against RBL

This is more a reminder to myself than anything else … this is small snippet that takes a list of IPs and does a whois on all that aren’t in a RBL

Lets say we have al list of IPs in a file “iplist.txt”:
12.172.121.171
24.149.208.68
38.105.100.9
58.185.207.86
61.201.51.66
64.78.164.169

Snippet that checks the IPs (can of course be easily changed to check IPs that are IN a RBL)

Select All Code:
1
2
3
4
5
6
7
for ip in $(cat iplist.txt)
do
test $(/usr/bin/rblcheck -qm ${ip}) && continue || clear
whois $ip
printf "###########################\n##### %15s #####\n###########################\n" "${ip}"
read
done


Trackback URL


No Comments on "Checking a list of IPs against RBL"

Hi, leave a comment:


ALLOWED XHTML TAGS:

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

Subscribe to Comments