Forum Moderators: phranque
I hope this is the correct place to add my query.
I created an add url form for my website and after a while i started getting spam from - poker, casino, black jack ect constantly.
So i deleted my form on my webpage and thought that woudl fix it.
However i am still getting my form sent to me, with black jack and poker ect .....How can this happen?
Im befuddled!
Is it that now my page is cached they have a copy of it they can still send em emails? Its been deleted for about a week and a half.
Has anyone any idea?
thank you!
Spambots roam sites collecting email addresses. It makes no difference what use the email address serves.
Kaled.
Maybe this solution may not be full proof but its working fine at my end and i hope it works good for you also.
&checkreferer;
sub checkreferer {
my $referer = $ENV{'HTTP_REFERER'};
my $ref;
my @referers = ('example.com\/pagewhereformresides\.htm','www.example.com\/pagewhereformresides\.htm');
my $hostpage = 'http://example.com/pagewhereformresides.htm';
if(!$ENV{'HTTP_REFERER'}) { print "Location: $hostpage\n\n"; exit; }
foreach $ref (@referers) { if($referer =~ m/^(http:\/\/)?($ref)/i or $referer =~ m/^(https:\/\/)?($ref)/i) { return; } }
print "Location: $hostpage\n\n";
exit;
}
Add this sub routine at the start of your CGI / Perl script.
Ideally, all destination email addresses should be stored in a configuration file - certainly, they should never appear anywhere in the source code of a page.
There have been a couple of attacks this week on my formmail script - the security held. A well written script is useless to a spammer - the most he can do is send you a few junk bits of garbage whilst he tries to find a weakness.
Kaled.