virtualconspiracy.com

Projectz
Script Decoder
RGJTool
Dilbert Ripper

Articles
Breaking The Windows Script Encoder

Puzzles
Puzznic

Links
Links


The Dilbert Ripper is a small Perl script that connects to the Dilbert web site (www.dilbert.com) and saves todays Dilbert comic to a file.
Adjust $outdir to where you want the comics to be stored.
I'm not a Perl guru so this script probably could be much more efficient.

It takes one optional parameter of the form yyyymmdd. If this parameter is not present, the script will grab todays comic. Note that the Dilbert web site only archives the last month of comics.

Sometimes the Dilbert web site is overloaded and the resulting GIF file will be present, but 0 bytes large. In that case, simply re-run the script.

Download ripdilbert.pl

#!/usr/bin/perl
$site = "http://www.dilbert.com";
$prefix = "\/comics\/dilbert\/archive\/images\/dilbert";
$outdir = "/home/conspiracy/public_html/comics/dilbert/";
$tmpfile = "dilbert.tmp";
$q="-q";

unlink $tmpfile;
if ($#ARGV == 0) 
{ $d = shift(@ARGV); }
else
{ $d = `/bin/date +%Y%m%d`; } 
chomp($d);
if (!-s "${outdir}dilbert-$d.gif")
{
	system ("wget ${q} -O $tmpfile $site/comics/dilbert/archive/dilbert-$d.html");
	open(FH,$tmpfile);
	while ()
	{
		if (/$prefix([^\.]*).gif/) { $lnk=$1; $xt="gif"; last; }
		if (/$prefix([^\.]*).jpg/) {  $lnk=$1;$xt="jpg"; last; }
	}
	close FH;
	system ("wget ${q} -O ${outdir}dilbert-$d.${xt} $site$prefix$lnk.$xt");
	chmod 0644, "${outdir}dilbert-$d.${xt}";
   unlink "${outdir}laatste.gif";
   system ("/bin/cp ${outdir}dilbert-$d.${xt} ${outdir}laatste.gif");
   chmod 0644, "${outdir}laatste.gif";
}
#unlink $tmpfile;

Sexy Lingerie   -   Stout en Lekker   -   Gewillige Sletjes   -   Extreme Sexfilmpjes   -   Gratis Sexfilmpjes   -