Author: meandean

  • What We Say to SCO vs. What They Hear

    Some years back, that clever cartoonist of the Far Side defined what I like to call the “Larson’s Dog Syndrome.” Here is a transcription of the dialog in the bubbles over the characters heads:

    What we say to dogs: “Okay Ginger! I’ve had it! You stay out of the garbage! Understand Ginger? Stay out of the garbage or else!”

    What they hear: “blah blah Ginger blah blah blah blah blah Ginger blah blah blah blah blah blah”

    Which is why this past Sunday’s artistic offering from UserFriendly based upon the original so hilarious … if the whole SCO/*nix saga weren’t so daggumed pathetic.

  • Variation on the HoneyPot theme :: the Looback

    Kung Fu Grippe’s (KFG) “Honeypot for spam harvesters” got me to thinking. In the past, I’ve often added a loopback email address on a contacts page so that dumb spambots that harvest and email on the fly will send a copy to whomever is hosting the spammer’s operations. That address would be abuse@[127.0.0.1]. Which is okay up until you get into the world of hijacked servers, open SMTP relays and or spambots looking for the well known IP looback address of 127.0.0.1.

    So taking some ideas from KFG’s article, I created a bit of PHP that will look up the domain of the spambot/spybot and create and email address for their abuse administrator, such as abuse@verizon.net. Here is how I do it

    $GLB_Loopback;
    function GetLoopback() {

        global $GLB_Loopback, $REMOTE_ADDR;
        if($GLB_Loopback) return $GLB_Loopback;

        $loopback = gethostbyaddr($REMOTE_ADDR);
        if($loopback && $loopback != $REMOTE_ADDR) {
         $levels = explode(“.”, $loopback);
         $ubound = count($levels);
         if($ubound – 2) $loopback = $levels[$ubound-2].’.’.$levels[$ubound-1];
        } else {
         $loopback = “[$loopback]”;
        }
        
        $GLB_Loopback = ‘abuse@’.$loopback;
        return $GLB_Loopback;
    }

    Here is how I add it to my church’s contacts page. I created a 1×1 transparent .GIF file, then put it on a place on the page where no normal human would suspect. You can view the source to see how your results vary:

    <a href=”mailto:<?php echo GetLoopback(); ?>” title=””><img alt=”” src=”/graphics/email.gif” width=”1″ height=”1″ border=”0″ /></a>

    Coming up next … for those of you getting cross-eyed with all the hyper-tech … simple site reviews … I swear (well, not really!-)

  • Honeypot for spam harvesters

    In case you didn’t know, a ‘Honeypot’ is usually a site, server, a page, sometimes even a network that is configured to draw the low-life, maggot-bearing flies that are spammers. In doing so, those setting the trap record the spammer’s IPs and user agents so they can be blocked, thwarted, poison, and other things spambots and spybots deserve.

    Mark Pilgrim showed us a version of one such Honeypot in his oft-quoted article, “How to block spambots, ban spybots, and tell unwanted robots to go to … ” … er … h-e-double-hockey-sticks. In the article, Mark shows us how to set up a page to snare those bot’s that ignore or abuse the Robot Exclusion standard. He then adds offenders to a growing .htaccess file to deny the pests access to his server.

    That was back in February. Almost half-a-year later, Merlin Mann at kung fu grippe shows us another ingenious catch and destroy method in his article entitled Honeypot for spam harvesters (now officially Project Honey Pot). Similar to an anti-spam technique for those leaving comments on blogs and bbs’ where one uses a throw-away email address built on the name of the blog and the date (e.g. hycw-21jun03@…), this article gives us a very simple PHP techinque to give spam harvesters what they want, an email address.

    Only the address they get is THEIR (the spammer’s) IP address and date sent back to them. Concurrently, the Honeypot records the IP, time and user agent to whom the address was distributed. If and when spam comes in via the harvested address, you have enough information to complain upstream, and to block that particular user agent and/or IP in the future. Pure genius I tell you!

    One caveat that the article offers, that I entirely agree with — use a throw-away domain name. Which I have. Hmmm .. perhaps a site with more than one technique? (what you don’t hear right now is the evil laughter billowing through the basement of my house !-)

  • VerseScrape 0.3

    Well sometime during the past few weeks, the good folks over at the International Bible Society added an audio hyperlink to their verse of the day javascript which in the past I’ve parsed via VerseScrape into an include file for my javascript impaired friends. That and by scraping the verse, I can then render using my own tags and styles.

    The nice thing about the inclusion of the audio tag is that it simplified the token I needed to define the end of the passage and reference. Moreover, the second element of the split, the audio verse, is modified to include the reference verse as a title argument within the hyperlink tag.

    The bad this I just discovered at the stroke of midnight, not all their verses include an audio link. So for those of you coming back to leave a comment that the code is broke — if fixed it to handle scrapes with and without audio links:


    Oh but that’s not all. While my system was in transition, Glenn over at The Journal modified VerseScrape to his own likings (he also graciously pointed out a typo/bug in mine). Proving once again that with Perl, there is more than one way to skin a cat.

  • Scripturizer 1.2, now with MT Plugin-ability

    Hey all, love the feedback.

    So much so, there’s a version 1.3 I’d rather y’all reference.

    And to kill confusion, I’m removing the current code snips/examples so we’re not trying to maintain updated legacy code.

    Thanks! I look forward to your comments over here:

    Hyperlink Bible References using Scripturizer 1.3

  • Church Web Sites – What We Don’t Know

    Michael Boyink once again provides me with some good topical information. This time, it is a rather post entitled “Church Web Sites – What We Don’t Know” in which he enumerates discussion on three basic questions regarding your church or charity web site:

    1. How Christians (and people interested in Christianity) Use the Web?
    2. What a Church Web Site Should Be?
    3. How To Measure the Success of a Church site?

    I like these questions. They specifically remind me of an important question posed to me in my interview with Niphal Online:

    Would you say that there is an understanding of the importance of the Internet in people’s lives? That this translates into a massive mission field? Do church leaders recognise this?

    No, yes and no. One only need read the Pew Internet Project’s December 29, 2002 report in which asserts that most people expect to find the information they seek via online sources before any other. This means for those who are seeking to fill that “God shaped vacuum in every heart” identified by Blaise Pascal 150 years ago are turning to the net.

    Unfortunately, the Church doesn’t understand that and not only misses on leading seekers to Christ, but losing believers to heresy, agnosticism and/or apostasy. Like every area of our lives, we are commanded not just to make converts, but disciples. Which means you can have all the slick Flash animation you want on the site, but if you’re all style and no substance than you may attract a seeker who’s prone to shiny things, but you’re not going to keep them.

    This is reflective not only in the number of church web sites that haven’t been updated since the turn of the century, but also the lack of resource and time most churches fail to invest their web presence.

    In other words, Mr. Boyink is dead on when he asserts that just like everything and everywhere else on the web “People are going to the web, and your church site, with a specific task to do, or question to answer — let’s forget about having to entertain easily-bored surfers.

    He later buttresses this point with an excellent example of why we waste our time and the time of those visiting our church web site by trying to turn it into an uber-portals chock-full of syndicated news feeds, and one of my pet peeves, the local weather when he writes:

    What this unique content doesn’t include is the local news, sports, and weather. Given that to an individual web user the entire Internet is the same distance away, and takes the same effort to get to, there is just no good reason to give up your church’s valuable home page space to this type of content. Based on our knowledge of “direct driving” on the net, people wanting weather will go to weather.com – even if your feed is from weather.com. Weather from a weather site will be perceived as being more up to date, and more trustworthy than that same weather presented in the context of a church site. The average user is confused by the function of the home page button, for goodness sake – what do they know about dynamic syndicated content?

    Basically what Boyink gets around to saying is that hits mean nothing, its about creating community and changing lives. I agree. On this site, we have examined several church web sites that have required healing because those creating it did not take time to ask the simple questions “who is my target audience?” and “how do I best serve them?”

    Yo, Mike! That is so on target, I could kiss you on the lips for that one — though I’m sure you probably just prefer a well deserved “AMEN!”

  • Stupid Array Tricks in Perl

    Later tonight, I’m going to talk a little bit about security and ethics and things to keep in mind as church members come and go, or as you as a developer move from one church to another.

    Meanwhile, I’ve had a brain fade this morning. I forgot how to sort arrays in Perl. Good thing way back in June of this past year, I mentioned the Perl Circus as a “Resource Filled” site.

    Here is just what I needed to jog my memory:

    @arr1 = (“zero”, “one”, “two”, “three”, “four”);
    @arr2 = sort{$a cmp $b} @arr1; #in ascii order
    #or
    @arr3 = sort{$b cmp $a} @arr1; #in reverse ascii order
    @arr4 = sort{$a <=> $b} @arr1; #in numeric order
    print “@arr2”;

    RESULT: four one three two zero
    DISCUSSION: The sort function takes a block and an source array. It will use the block to determine how to order the array it returns. The variables $a and $b in the sort block are special and can be used to force the ordering from top-down ($a, $b) or from bottom-up ($b, $a). Beware that using cmp will sort according to the ASCII order of the array elements, while <=> will sort according to their numeric value.

    DUUUHH, I can’t believe I mentally misplaced something so simple as the above. Actually what I forgot was the difference between sorting alpha and numeric entities. I must be getting old. What am I saying? By most coder standards I am as old as dirt.

    So help out this gray covered (but still gargantuan) crainium of mine. How about some comments, who’s got a page full of good PHP array tricks? Python? I’d say VB.Net but their collections class is insanely addictive I dare not mention it …

  • Dive into Retractions

    This amusing note from dive into mark:

    A representative for the company that makes PowerSiphon contacted me to correct my article on how to block spambots. I claimed that PowerSiphon was the spider with the User-Agent EmailSiphon. It is not. I have updated the article to retract my previous statement, and I apologize to the company for the mixup. You can draw your own conclusions about whether a retail web spidering product with a checkbox labeled “Extract email addresses” is a spammer’s tool, but it was not the specific tool I was seeing in my access logs.

    Well, my feeling is that I would prefer any User Agent named “EmailSiphon” not visit my site. It’s probably a knee-jerk reaction on my part, but it is my opinion and I’m entitled to it.