#cookies.pl #usage cookies.pl [site] - specify site or leave null for all use strict; use Term::ANSIColor; my $site = $ARGV[0]; my %values; open(COOKIE, "$ENV{HOME}/.netscape/cookies") or die "Yack!: $!\n"; while () { next if ($_ =~ /^[#\n]/); chomp; my ($domain, $x, $path, $x, $x, $key, $value) = split(/\t/, $_); $values{$domain}{$key} = $value; } foreach my $d (sort keys %values) { next unless !($site) or $d =~ /$site/; print color("underline"), "$d", color("reset"), "\n"; foreach my $k (sort keys %{$values{$d}}) { print "\t", color("green"), "$k"; print color("reset"), " => "; print color("yellow"), $values{$d}{$k}; print color("reset"), "\n"; } }