Grab That Cache

by David Nicol

After reading all about "right-click protection" and how it is supposed to work, I thought I'd share the method I use to locate an image I have seen recently on a web page when I want to share it with someone.

Since all images are kept in Netscape's cache, it is possible to create HTML pages that refer to the images in the cache, and then work with the images you want.  I do this with a small Perl program something like this:

[See Perl code below]

This gives you a bunch of HTML pages each with a hundred files from Netscape's cache on it as images.  When you find the image you want, clean up with something like this:

$ rm -rf pages17*

Below is a window-grab of the result of running the above program on my Netscape cache.

#!/usr/bin/perl
#
# Grab That Cache
# by David Nicol
#
open FILELIST, "find ~/.netscape/cache -type f |";

	mkdir "pages$$", 0777 or die "Could not make directory to put the HTML pages in.\n";

	$Page = 'aa';

	while (<FILELIST>) {
		chomp;
		print "adding $_ to pages$$/$Page.html\n";
		open PAGE, ">> pages$$/$Page.html" or die $!;
			print PAGE "<img src=file:$_ height=40 width=40>\n";
			$. % 10 or print PAGE "<br>\n\n";
			$. % 100 or $Page++;
	}
close FILELIST;

Code: grabcache.pl

Return to $2600 Index