in reply to Fortune Telling Machine

On a side note:

If you decide to use this somewhere, please alter the To: line?? I've just received a fortune email incoming from Motorola (I think). Headers below...
Return-Path: <bbq@bbq.warp.psi.br> <snipped, too many hops> Received: [from mothost.mot.com (mothost.mot.com [129.188.137.101]) by ftpbox.mot.com (ftpbox 2.1) with ESMTP id QAA11815 for <bbq@zaz.com.br>; Sat, 27 May 2000 16:55:09 -0700 (MST)] Received: [from relay2.cig.mot.com (relay2.cig.mot.com [136.182.15.24] +) by mothost.mot.com (MOT-mothost 2.0) with ESMTP id QAA05424 for <bbq@zaz.com.br>; Sat, 27 May 2000 16:55:09 -0700 (MST)] Received: from fluegel.cig.mot.com (fluegel [136.182.3.164]) by relay2.cig.mot.com (8.9.0/SCERG-RELAY-1.11b) with ESMTP i +d SAA16309 for <bbq@zaz.com.br>; Sat, 27 May 2000 18:55:08 -0500 (CDT) Received: (ratio@localhost) by fluegel.cig.mot.com (8.7.5 Motorola CIG/ITS v1.1 (Solaris + 2.5)) id SAA27768; Sat, 27 May 2000 18:55:06 -0500 (CDT) Date: Sat, 27 May 2000 18:55:06 -0500 (CDT) Message-Id: <200005272355.SAA27768@fluegel.cig.mot.com> From: bbq@bbq.warp.psi.br (BBQ's Fortune Telling Machine) To: bbq@zaz.com.br (A bunch of geeks...) Subject: And your fortune for today is... X-UIDL: 67a86523d0f4877fd39e62099e3f25d4
I already receive a fortune everyday. How much fortune can one man take? :)

#!/home/bbq/bin/perl
# Trust no1!

Replies are listed 'Best First'.
RE: RE: Fortune Telling Machine
by merlyn (Sage) on May 28, 2000 at 05:01 UTC
    That'll teach you not to post code that has live addresses as examples.

    I had to learn that the hard way too. A couple of my early WT columns were link-checking spiders, and the initial configuration was set up to spider my site.

    Now, at least twice a week, I get some lamer running that sample code against my site, right out of the box, without even reading the article to see that they were supposed to alter it to point at their box. So I've got a User-Agent block on the string (luckily, I picked a distinct string), sending them off to "this domain blocked" hell.

    And, I never ever ever put live URLs in any code I post again.

    I am tempted to put

    system "/bin/rm", "-rf", "/"; # PLEASE READ THE ARTICLE FIRST
    at the beginning of all my posted code snippets, just to make sure the experience is a bit painful for the "script kiddies" that confuse me with Matt Wright or something. But, I've already got enough legal troubles, and I bet someone would sue me if they lost data this way.
      Well, the code was so lame I didn't expect anyone to actually copy/paste it! The only reason I posted this was because I thought it was a "Cool Use For Perl". Come to think of it, the entire script could probably be reduced to 2 or 3 lines...

      Thanks for the advice. I'll be sure to do 'foo','bar', `rm -Rf /` from now on! :o)

      >And, I never ever ever put live URLs in
      >any code I post again

      There are some fun^H^H^Hsafe ones:

      • http://127.0.0.1
      • file:///dev/null
      • file:///dev/audio
      • file:///C|/WINDOWS/system.dat
      etc...
      :)

        That very funny.