Gossamer Forum
Home : General : Chit Chat :

A question about SPAM

Quote Reply
A question about SPAM
I get a lot of spam. Almost 100% of the spam I get contains links to sites and images. I've noticed several trends in spam:

1. A majority of them use nonsense tags to break up text in an attempt to foil email filters (example below).

<sparingly>SP</sparingly><winter>AM</winter> results in "SPAM" (when HTML view is enabled).

2. Many contain links such as this one I just got:
<a href="http://destine@www.10cialagenius.biz/default6.htm">

3. Many contain hidden input tags with a long string of characters (I assume to indentify someone/something):
<input type="hidden" value="agaejlfjafljja ljfafjkj">

I can't think of any legitimate use for any of the above things I mentioned. Can you?

I tried to set Microsoft Outlook up to filter and delete items based on the above, but Outlook either doesn't look for items in the <html></html> section of the body of an email, or it doesn't understand "contains" (pattern matching). Such as Example (ample in Example).

So... I was hacking this sample script I that came with "Perl for Dummies" and wondered if it would be good as a SPAM filter.

Code:
$Name = 'yourUserName';
$Pass = 'yourPassWord';
$Serv = 'mail.yourDomain.com';

use Mail::POP3Client;
$Client = new Mail::POP3Client($Name, $Pass, $Serv);
$TheState = $Client->State;
if($TheState eq 'AUTHORIZATION')
{ die "Bad user name or password.\n" }
elsif($TheState eq 'DEAD')
{ die "Mail server unreachable or unavailable.\n" }

# Find out how many messages there are
$NumMsg = $Client->Count;

#Loop through the messages (starting at 1)
for($i = 1; $i<=$NumMsg; $i +=1) {

$Body = $Client->Body($i);
if ($Body =~ /(input|\@www.)/) {
$Client->Delete($i);
&ProcessReport($Body);
last;
}

}
# Close the connection so the delete happens
$Client->Close;

sub ProcessReport {
my($Report) = pop(@_);
# Do something here that is processing the report
print "deleted 1 or more emails";
return;
}

As you can see here I'm filtering on "input" and "@www."

This seems to work, but I haven't tested it thoroughly and I don't know enough about Perl to know if this is good code or sloppy code.

My thoughts are to have an icon on my desktop that would launch this script then have it execute Outlook when done. Not sure though.

Any comments, ideas?

I guess I could sign up for somekind of Spam Killer account or software - but that wouldn't be any fun.
Subject Author Views Date
Thread A question about SPAM Watts 7116 Dec 12, 2003, 1:32 PM
Thread Re: [Watts] A question about SPAM
Alex 6759 Dec 12, 2003, 2:11 PM
Thread Re: [Alex] A question about SPAM
Watts 6758 Dec 15, 2003, 7:48 AM
Thread Re: [Watts] A question about SPAM
Coombes 6754 Dec 15, 2003, 7:53 AM
Post Re: [Coombes] A question about SPAM
Watts 6680 Dec 15, 2003, 7:55 AM