in reply to use Perl to maintain blocked host file
One potential problem is that the dubious web sites (particularly advertising ones) do not always have a homepage. If you try and access http://mysite.com/ they can just return a 404 error which may lead you to assume that the site cannot be found or served etc.
#! /usr/bin/perl -w use strict; print "<html><body>\n"; while (<DATA>) { #remove leading and trailing whitespace s/^\s+//; s/\s+$//; #split into an array my ($dummy, $url) = split /\t/, $_; #do something with the url print "<a href=\"http://$url\">$url</a><br>\n" if $url; } print "</body></html>\n"; __DATA__ ################################################################### + # # + # Created by Alan Bradley on 1-03-04 # + # # + # this list currently has 61882 different blocked servers # + # # + # # + # # + ################################################################### 0.0.0.0 00.goodoo.ru 0.0.0.0 00.smi.ru 0.0.0.0 000.2.links4trade.com 0.0.0.0 0000hits.net etc.
|
|---|