The things you can do with a little script! A Wired reporter is telling the story of how a Perl script he wrote led to the arrest of an online sex offender. The magazine is set to release the script under an open-source license in the near future, so you can refine it and help making MySpace a tougher playground for those flagitious felons.

Wired writer Kevin Poulsen put together about 1,000 lines of Perl code that match data from the National Sex Offender Registry to MySpace user profiles, looking for perpetrators arrogant or witless enough to sign up for a MySpace account under their real names. Poulsen ran his script, got back at least 2,000 results, and started sifting through the data to sort out the false positives. Some of the verifiable matches bore the signs of a repeat-offender mentality, like a 33-year old man convicted for molesting a child under the age of 13 who set his MySpace motto to "Love knows not age."

The reporter narrowed his list down to one target, Andrew Lubrano of Centereach, NY, with three previous convictions, nine years served behind bars for molesting young boys, and a penchant for calling 16-year-old boys "sex toy" in public MySpace posts. Local police, grateful for the tip, let Poulsen sit in on the proceedings of running a sting on Lubrano, and the man was soon under custody although he could only be charged with a misdemeanor of endangering the welfare of a child.

It's a success story, albeit somewhat muted by the limited result, but it also highlights many of the problems inherent in scripting a search like this. For one, many offenders likely sign up under assumed names, making them invisible to this sort of script. Further, it takes a trained human eye to carry out visual matching of photographs in order to ensure a valid match—again assuming that the MySpace photo is the real deal. Also, the privacy rules that are meant to protect users like our children also serve to protect criminals, making it easier for them to carry out their depraved deeds out of the public eye.

Currently, MySpace says its privacy policies will have to do until we get laws that force sex offenders to place their e-mail accounts in a central registry, making them easier to ban. But you don't need to show ID to get a Hotmail account, nor GMail, or Yahoo Mail, or start up your own mail server on a Linux box and use that e-mail to sign up with MySpace. Poulsen suggests that MySpace would be smart to set up a screen for objectionable traffic through its systems, public or private, to catch offenders in the virtual act of propositioning teenagers or worse. Looking for people with a shameful past will lead to the occasional hit, sure, but not every sex offender is a repeat customer. And there's no point in signing up under false names and temporary e-mail addresses if your actual immoral acts can be tracked. I'm all for that, and in the meantime I'll apply my regex-fu to that Perl script once it's published, to see if there's some public good to be done here. And then, I'll replace myself with a small shell script.

Further reading: