KillerSites Blog

Spamming spammers – with PHP.

September 1, 2006

I have a nasty habit that is born out of my petty and self destructive instinct for revenge: I spam spammers.

I’ve (like many of you,) have been and still am subject to constant spam attack. But not just one ‘style’, I actually get spammed on all fronts:

  • Email spam.
  • Blog spam.
  • Forum spam.

… it seems that the spam world considers me to be a ‘spam-licious’ target.

REVENGE IS A DISH BEST SERVED WITH PHP

Being an ubernerd … I got me some options to reflect the pain back to my assailants: php mail() and a for loop!

Check it out:

$str = “Automated response From: Killersites.com – you (spammer@some_domain.com) have sent us spam messages … not nice.”;

for($i=0; $i < 250; $i++) { $did_send_mail = mail('spammer@some_domain.com','Automated Response From: Killersites.com System', $str); } - Nothing special in the php code here. But it holds a special place in my heart. 🙂 Now whenever I see it as required, I fire off this script to the lil' bastard that spammed me. Their lucky I don't slap another zero or two in the loop count: 250 -> 2500 or even 25000!

DOES IT WORK

Well I tend to get much fewer repeat offenders since I’ve been doing this.