Hunajapurkki: A honeypot link widget for WordPress

0.00 avg. rating (0% score) - 0 votes

As a first excercise in creating WordPress plugins, I decided to write an extremely simple widget which can be used to lure spammers’ address harvester bots to honeypots, for example ones set up using the Project Honey Pot web site. If you want to help fight spam, just sign up for free at their page and follow the instructions. You can add your honeypot to your WordPress site using the Hunajapurkki widget.You can use either the QuickLink URL, which is extremely simple, or set up your own honeypot on your own server if you’re feeling a bit more adventurous. In both cases, you should end up with a URL which is the honeypot. You will add this URL to the Hunajapurkki widget.

Installation of Hunajapurkki

  1. Download Hunajapurkki.zip
  2. Unzip Hunajapurkki.zip to the /wp-content/plugins/ directory.
  3. Go to Appearance -> Widgets and add a Hunajapurkki wherever you wish and as many times as you wish.
  4. For each added widget, you must provide a honeypot URL

Remember, the widget should in no way be visible on the page to anyone browsing the site. There should be nothing, not even empty space, shown where you added the widget.

If you want to confirm the installation was successful, you can look at your page source code and search for “hunajapurkki”. Your honeypot link should show up there. In fact, if you look at the source code of my blog’s front page, or any page in it, you should be able to find one or two honeypots there.

Technical details

What will be added in place of the widget is html like this:

Any modern browser should display nothing on the screen, because of the “display:none” CSS attribute. The a tag intentionally does not have the “display:none” attribute in case the spambot is looking for it. Also, the link has content in it for the same reason.

I have tested with Firefox, Chrome and Opera, and Internet Explorer down to IE7 using
the sidebar of the default WP 3.4 theme, and it seems to behave fine.

In case you are wondering about the strange name of the widget, Hunajapurkki, it comes from the Finnish language, meaning literally ‘a honey pot’.

Leave a Reply