What is Spam Obfuscator?Do you get spam mail because you have your email address on your website? Are spammers picking up your email address from newgroup posts where you have included your email address in your signature? There are several ways to thwart spammers and spam bots. An easy way is to replace the @ with a small gif/png image or with AT like this: John.Doe AT nocompany.com (replace the AT with @). Other methods use mail filtering using lists of known spammers lists.
The method described here tries to obfuscate your email address by placing fake words in your normal email address and providing a clue to the astute reader as to what word to remove. I got this idea by seeing others with such email addresses but I wanted to automate the process and have some fun at the same time.
Reload this page by clicking the Spam Obfuscator link in the Contents a few times and see how the email address below changes:
Remove the minerals for my email. John.Doe@(malachite)nocompany.com
Neat eh :-)
How is it run from the command line?Getting it to run from the command line is a simple test. After installing it, and if you are in the same directory as the executable, just type:
echo "%s John.Doe@%s.nocompany.com" | spamobYou should get something like this:
Remove the minerals for my email. John.Doe@malachite.nocompany.comThe first %s is replaced with a random phrase and the second %s by an appropriate word to fit with the phase. Remember, you will need to set the user permissions so that you can execute it.
How is it run for a Web page?Copy the spamob to your cgi-bin directory or to wherever you place your executable web scripts. You will need to set the group permissions so that your web server can execute spamob as a script. If it does not run check the httpd error logs for help.
Run the script from your web page. Here is how the above email was generated from this web page using PHP.
You can also add HTML formatting to the string that is fed into spamob:<?php $command="echo \"%s John.Doe@%s.nocompany.com\" | /home/user/cgi-bin/spamob; passthru($command); ?>
<?php $command="echo \"<I>%s</I> <A HREF=\"mailto:John.Doe@%s.nocompany.com\">John Doe</A>\" "; $command = $command . "| /home/user/cgi-bin/spamob"; passthru($command); ?>
Here are some typical outputs.
To email me, smash the sub atomic particle; John.Doe@meson.nocompany.com
Remove the minerals for my email; John.Doe@malachite.nocompany.com
Hunt the dangerous animal for my email; John.Doe@zebra.nocompany.com
How is it run from an email client?This is how I run Spam Obfuscator from my mutt mailer. Just edit your mutt .muttrc file and include the line:
where nospam.sig is a short shell script that says...folder-hook Inbox set signature="/home/user/bin/nospam.sig|"
#!/bin/bash echo "John Doe, NoCompany Inc." echo "Home: http://www.nocompany.com" echo "%s John.Doe@%s.nocompany.com" | ~/bin/spamob
What files are required?The executable: Have a look at the script here. The Spam obfuscator is a single Perl script which can be placed with your directory for web pages running PHP, in cgi-bin if you have dynamic web pages or in your local bin directory if you only want to run it for your mail client like mutt.
The word files: The word files are just plain text files placed in a .spamob directory under your home directory. They are chosen randomly by Spam Obfuscator.
This is a sample of a word file for the animal list. The string phrase= is a keyword which specifies the phrase which will be substituted for the first %s in the input string fed to Spam Obfuscator. The word that is randomly selected will be substituted for the second %s.
# phrase=Hunt and kill the dangerous animal for my email. antelope zebra giraffe horse gnu
Get itDownload it from the download section here: Download. The gzipped tarball is just 4k in size and contains the Perl program and some word files.
LicenceSpam Obfuscator is released under the GNU General Public License.. A local copy can be found here. Of course suggestions for how to improve it are most welcome.