WP Plugin » SpamKit Plugin 0.0 - Time-Based-Tokens to Fight Spam
This is the first release and prototype of SpamKit for Wordpress.
SpamKit was written by Gerard Calderhead; it’s a PHP library that uses secure time-based-tokens to aid validating form post’s and can be used on guestbooks, blogs, form-mailers etc.
It does this by generating a checksum’d and encrypted ‘token’ containing the UNIX-timestamp from when it was generated. This ‘token’ is written out into the form as a hidden field. When the form is posted back to the server, the token’s value is validated. If it is invalid or tampered with validation will automatically fail, if the token has ‘expired’ it will also fail.
I took SpamKit and plugged it into Wordpress to do the following:
- When a comment form is drawn, a time-based-token is generated and inserted as a hidden field in the form.
- Where the comment would normally be approved, SpamKit is used to validate the token; if corrupt, missing or expired the comment is flagged as ‘spam’ preventing any email notification of the comment being posted.
- After the comment has been saved (as ‘spam’) by Wordpress the plugin changes the comment’s status to ‘Awaiting Moderation’ to allow the moderator to delete it at a later date.
The end result is comment-spam sits in the ‘Awaiting Moderation’ list without generating any email to say so.
The third step may not be what everyone desires for the plugin’s functionality but being a prototype there are no option pages to control this as yet.
The SpamKit plugin has been tested on Wordpress 1.5 only and found to operate as expected on even the most liberal configurations.
Installation is simple, there are no configuration options that require changing, simple copy it into the plugins directory and activate it from the administration screen.
Download: spamkit-plugin.zip
Comments, Questions and Feedback welcomed!
Updated [3rd January 2006] - Download link points to wp-plugins.org
3 Comments so far
Leave a comment
Do you know if anyone has tried your plugin on WP- Mulit User?
I am hoping to find a solution that will allow me to protect all of my users blogs.
Akismet would be great but I would need to set each blog up individually and it seems silly to create a blog on wordpress.com to get an api key for each of my bloggers on dakotablogs.
By Cam on 12.07.05 19:11
[...] Update: Michael, over at lobstertechnology.com, has wrapped my TBT code to turn it into a WordPress plugin [...]
By Web Of Shite » Blog Archive » Fighting Link-Spam with Time-Based-Tokens on 12.10.05 16:12
[...] After my recent release of SpamKit Plugin I have been contemplating the whole spam problem in much greater depth. Gerry highlighted one major problem with my SpamKit plugin itself – trackbacks are considered spam because they don’t include the time-based token. I started to look into amending my plugin to support them when I realised that this would be a serious loop hole. [...]
By lobstertechnology.com » Weblog of Michael Cutler » More thoughts on SpamKit… on 12.16.05 00:31
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>