Re: OT moz-firefox's cookperm.txt is now hostperm.1
On Thu, 2004-02-26 at 01:16, Nano Nano wrote:
> FYI:
>
> CVS builds of moz-firefox have changed the cookperm.txt file to a
> hostperm.1. I don't know about you, but I've built up my cookperm.txt
> file over the past year with a wonderful list of blocked cookie and
> images hosts -- and I back it up, because I've already blocked
> everything *I* need blocked.
>
> This bit of perl will translate your old cookperm.txt to the new format:
>
> $T[0]='cookie';$T[1]='image';
> $C{'T'}=1; $C{'F'}=2;
> printf "# Permission File\n";
> printf "# This is a generated file! Do not edit.\n\n";
> while (chomp ($x=<>)) {
> if ($x =~ /^([^\t]+)\t([01])([TF])\t?([01]?)([TF]?)$/) {
> printf "host\t%s\t%s\t%s\n", $T[$2], $C{$3}, $1;
> if ($5) {
> printf "host\t%s\t%s\t%s\n", $T[$4], $C{$5}, $1;
> }
> }
> }
>
Perl for the swines, well I'll gobble it up, thanks!
Looks very useful. I like to block things too. If it moves shoot it.
Chris
Reply to: