the_pm
April 28th, 2006, 04:23
Hey everyone,
I decided it was time I built myself a spider trap. For those who are not aware, a spider trap is a script that automatically bans bots from a site that do not follow instructions given to them in a robots.txt file. This will stop email harvesting bots, log spammers, bulk downloading software and search engines that are programmed to misbehave.
I'm looking for a script that will automatically ban the IP of the offending visitor the instant that page is hit. Bonus if it causes some sort of evilness on the bot.
Basically, it will work like this. Every page of [insert site here] will have a 1x1 pixel link before any other links on the page. The robots.txt file will contain explicit instructions for bots not to use the link. Should the bots use the link, the next page will contain a simple warning and a second link (this intermediary page is in the extremely remote event a real live visitor stumbles upon the trap). The warning will make it clear no one is to proceed. The link will activate the script, which will instantly blacklist the IP of the offending visitor.
So, how does one go about creating this script, or do you have a favorite script of your own you've tried? I know there are spider traps out there already built, but having no experience with them, I'd like input from IWDN :)
I decided it was time I built myself a spider trap. For those who are not aware, a spider trap is a script that automatically bans bots from a site that do not follow instructions given to them in a robots.txt file. This will stop email harvesting bots, log spammers, bulk downloading software and search engines that are programmed to misbehave.
I'm looking for a script that will automatically ban the IP of the offending visitor the instant that page is hit. Bonus if it causes some sort of evilness on the bot.
Basically, it will work like this. Every page of [insert site here] will have a 1x1 pixel link before any other links on the page. The robots.txt file will contain explicit instructions for bots not to use the link. Should the bots use the link, the next page will contain a simple warning and a second link (this intermediary page is in the extremely remote event a real live visitor stumbles upon the trap). The warning will make it clear no one is to proceed. The link will activate the script, which will instantly blacklist the IP of the offending visitor.
So, how does one go about creating this script, or do you have a favorite script of your own you've tried? I know there are spider traps out there already built, but having no experience with them, I'd like input from IWDN :)