Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: anti-spam E-mail filter

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
MarcelG Posted - 01 September 2005 : 15:14:20

version 1.1 - updated 03-09-2005

Here's a quick and simple mod I came up with after reading some topics here about spam some people received on their board created by autoregistration bots that succesfully get past the e-mail validation part.

It's a very simple mod, which simply dissallows certain e-mail domains from registering.

File to alter: Register.asp (be sure to backup first!)
Find this code:
		If strAutoLogon <> 1 then
			if Request.Form("Email") = "" then
				Err_Msg = Err_Msg & "<li>You Must give an e-mail address</li>"
			end if

if (Instr(lcase(Request.Form("Email")), "@gmailinator.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@dodgeit.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@spamgourmet.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@spamhole.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@jetable.org") > 0) or _
(Instr(lcase(Request.Form("Email")), "@bumpymail.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@mytrashmail.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@u-yep.com") > 0) then
	Err_Msg = "<li>Registration with an e-mail address from that domain is not possible!</li>" & Err_Msg
end if

As you can see I've already taken the liberty to add some domains for blacklisting. (including u-yep.com, and some fake mailservices such as dodgeit.com and mailinator.com)
When people try to register with any e-mail address from the domains listed, they get the message that that is not possible.

In order to add your own domains to block, simply copy the red line, and insert it inbetween the rest. Change the @spamgourmet.com domain into the domain you wish to block, and repeat for each and every domain you wish to block.
Now your ready to go.

(This mod can also be used the other way around ; e.g. allowing registration only from the mentioned domains, and excluding all domains not mentioned.
Simply change all instances of > 0 into = 0 and you're done.)
Any improvement/suggestion/etc is welcome!

Update


The code below also restricts already registered users from changing their e-mail address to any blacklisted address.

Find both instances of this line in pop_profile.asp:
if Request.Form("Email") = "" then

Directly above each instance add this code:
if (Instr(lcase(Request.Form("Email")), "@gmailinator.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@dodgeit.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@spamgourmet.com") > 0) or _(Instr(lcase(Request.Form("Email")), "@spamhole.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@jetable.org") > 0) or _
(Instr(lcase(Request.Form("Email")), "@bumpymail.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@mytrashmail.com") > 0) or _
(Instr(lcase(Request.Form("Email")), "@u-yep.com") > 0) then
Err_Msg = "<li>The e-mail domain you supplied is blacklisted at this board, and cannot be used!</li>" & Err_Msg
end if

Again, if you wish to add your own blacklisted domains, paste a copy of the red line in the code, and change the address.<
15   L A T E S T    R E P L I E S    (Newest First)
Joebobby Posted - 28 February 2010 : 09:39:23
I just installed 3.4.07 primarily hoping to be able to combat the spammers that are pummeling my site with spam. The spam that gets through is one issue and all of the bogus, newly-registered members are another. There are two things that I think would be very effective at combating them for my site. I've seen both of these things mentioned here in the Snitz forums, but the explanation for implementing the first option is not clear to me and I can't for the life of me find the threads that discussed potential ways of implementing the second option.

  • The first, simple solution to spammers on my site is the blocking of entire country codes (e.g. *.ru, *.pl, *cn). This is not an issue for my site's user-base because it is a regionally-focused site. In this thread above there is discussions RE: the implementation of this, including the display of a snippet of code. However, there isn't much explanation regarding where this code should be placed - it's not even clear to me in which file it should go, much less at which line. This is made more complex because my understanding is that this anti-spam e-mail MOD has been incorporated into 3.4.07, but I don't know how it was incorporated (e.g. using the code referred to in this thread, or by the creation of separate .asp files or by the use of a d'base somewhere). I have added some e-mail domains to the filter in 3.4.07 and it's working well for specific domains, but for example, it does not recognize wildcards '*', so entering the domain '@*.ru' accomplishes nothing. Could someone tell me if the code for banning entire nation codes (and *.info while you're at it) can be incorporated into 3.4.07 - and if so, please tell me in which file and before or after which lines of code it should be placed?


  • quote:
    (right(lcase(Request.Form("Email")),5)=".info") or _

    the number show the chars that are in the string
    .info = 5
    .biz = 4
    .ru = 3<


  • The second potential solution would be to add code that prevents the registration of users who use the same last name and first name. Really, about 99.9% of the spammers on my site do this - I assume they are probably using a 'bot to automate this process? I tried to search this forum a bunch of times but couldn't find the threads dealing with this again. If someone knows what I'm referring to and can tell what code to insert where and into which file (of 3.4.07) I would be greatly indebted to him.


Kind regards,

Joebobby
AnonJr Posted - 07 April 2009 : 15:07:52
quote:
Originally posted by Shaggy

I've always been much more partial to shooting the idiots who fall for their scams thus providing the spammers with a viable source of income and ample reason to continue pissing off the world.

True, if it weren't for the idiots there wouldn't be an incentive for them to keep doing this... How about we just shoot both?
Shaggy Posted - 07 April 2009 : 12:20:01
quote:
Originally posted by AnonJr
The best solution would be to shoot spammers on sight.
I've always been much more partial to shooting the idiots who fall for their scams thus providing the spammers with a viable source of income and ample reason to continue pissing off the world.

Carefree Posted - 07 April 2009 : 11:54:31
For a while, I kept a running total of the scam email attempts. When I got bored, I wrote one back. I haven't had any new ones for a while.

quote:
Ho-hum. The tedium of scam mails. I decided to save time and send a copy of this response to a whole crowd of African scam artists.

Be realistic - everyone knows that lotteries, etc.; are not announced via Email. If I had ever heard of the lottery/sweepstakes/drawing, I would not have entered; much less won. A consolation prize of $1M? You have taken too many drugs, your brain is fried.

Furthermore, Microsoft has their own Email server, perhaps you've heard of it "Microsoft.com"? Employees of Microsoft do not use companies like BigPond or GMail for Microsoft official business. Next particular bit of ridiculousness: if a lottery official was awarding a prize and had contacted a recipient, he/she would KNOW who the individual was and would not have to ask. These things are just too stupid.

OK - let's do a little bit of mathematics. $1,977,500 USD from you at today's exchange rate. Since the other nine scammers for this evening also promised me a total of just over $140,000,000 (140.0M) USD, my grand total for the last 30 days is $3.2B USD. My potential net worth is several hundred billion dollars (more than the GNP of Nigeria) if I were to collect all the money that I have supposedly won or that people wanted to "give" me.

Neither your name nor your Email address had any results on Google searches, so maybe you should have stuck with the old reliable "Brian Hunt". That scam name has been around a long time, too. He's got a number of Email addresses: brianhunt004@yahoo.co.uk; brianhunt008@yahoo.com; uknl-4@hotmail.com; fiduciary_unl@myway.com; fiduciaryagent@uknl-merseyworld.com; brianhunt2000@wherever.com; brian_hunt@maximumsecuritytrust.com; and ukrelease007@hotmail.com; just to choose a few. He's a busy little scammer.

Although each scammer changes the email slightly, the particular scam letter you chose this time has been around for a long time. Please write something new. I keep requesting some originality from your co-scammers, but it must be that not one African scammer has ever had an original thought. According to Interpol, Nigeria is the most corrupt country in the world followed by Pakistan, Kenya, Bangladesh, China, Cameroon, Venezuela, Russia, India and Indonesia (to round out the worst 10). Everyone has heard of Nigerian 419 scams and how to determine exactly how full of it you scammers really are. Why then, would you ever expect a thinking person to trust anything from your continent?

Numerous gorgeous women from around the world have suddenly "remembered" my Email address (even my new Email addresses which are less than three months old), decided to contact me and remind me that they are all helplessly in love with someone they have never met. Even more coincidentally, every one of these beautiful models has a mother who is sick in the hospital in Lagos, Nigeria. Can you believe it? I can't. Lagos, Nigeria must have the most contaminated water in the world to make all of these helpless women go to the hospital.

Your statistics have been added to my other contacts from the world's honest bankers, politicians, lawyers, government officials, persecuted innocent victims, widows, ministers, Shipment Officers, Online Coordinators, Operations Managers, Director of Claims, and ousted presidents". All of these individuals must have obtained my Email addresses from those gorgeous models; because unanimously, you have all collectively decided I'm a great guy - and you all want to make me rich, send me tens of millions of dollars, just to let you use my bank accounts to "deposit" your funds into.

After I collect the first few billion dollars that I'm owed, I will begin writing back to the models who remembered me so fondly. Unfortunately for me, I have lost 1471 relatives (whom I never knew I had) to disease, guerilla action, car accidents, plane hijackings and crashes - almost exclusively on that terrible road between Lagos, Nigeria and it's airport. If only I had already received a few hundred million dollars, I might have been able to afford them some health care.

Recently on the Internet, I watched a police raid on one of the Lagos, Nigeria internet café's during which they arrested a few of your co-scammers and confiscated their computers. I'm sure the police simply turned the perpetrators loose a couple of blocks away, just as soon as they were no longer being filmed, but it was a good show nevertheless.

To return to my first complaint - I'm bored. Write something completely new and I'll review it for ignorance, ridiculousness and sheer stupidity - I'm sure you will get a high score on all aspects.

AnonJr Posted - 07 April 2009 : 10:08:55
The best solution would be to shoot spammers on sight. Short of that, there is no "best solution" since they can generate more domains than we can keep adding - not to mention using legit domains for spam purposes... but this will at least mitigate some of the more egregious offenders and cut down on your work.

Alternately blocking a whole TLD isn't really an option too for reasons already posted.
Astralis Posted - 07 April 2009 : 00:36:39
So what is the best solution? I don't see how adding every domain possible is an efficient solution and others have recommended other solutions but is there a consensus about the best way to accomplish this without turning off email? AOL blocked my server because someone has been going crazy posting Nigerian spam.
MikeB.Lynn Posted - 09 March 2009 : 06:30:54
quote:
Originally posted by MarcelG

TO block top level domains, just add some lines in between, which are constructed like this:

(right(lcase(Request.Form("Email")),3)=".ru") or _


<


I'm using the spamserver lock add-on.
Will this code work with that? if so, where would it be inserted.

Thanks
Mike
Carefree Posted - 13 January 2009 : 04:09:59
quote:
Originally posted by sschaer

help needed. just downloaded the mod and did what it said in the readme file.

unfortunately i get the following error message :

Microsoft VBScript compilation error- Error '800a03ea'
Syntax error
/admin_spamserver.asp, line 143


i use windows xp pro (sp2) and no database (aka access like).

what could be the issue here ??



Delete the blank line at line 143.<
sschaer Posted - 13 January 2009 : 02:29:31
bump....



no help out there ??<
sschaer Posted - 05 December 2008 : 11:46:57
help needed. just downloaded the mod and did what it said in the readme file.

unfortunately i get the following error message :

Microsoft VBScript compilation error- Error '800a03ea'
Syntax error
/admin_spamserver.asp, line 143


i use windows xp pro (sp2) and no database (aka access like).

what could be the issue here ??<
gpspassion Posted - 23 November 2008 : 11:38:42
Well this has been working well, I can seem them trying to post and then getting "stuck" ! Do you think this type of trick could be used for registration too?<
gpspassion Posted - 21 November 2008 : 07:13:06
quote:
Originally posted by Podge

quote:
Any hints on what that work would be, I'm getting hammered by theses idiots !

In the short term you could try renaming post_info.asp to something random like 38324785_post_info.asp
You will need to edit post.asp so that line 494 is changed from
		"              <form name=""PostTopic"" method=""post"" action=""post_info.asp"""

to
		"              <form name=""PostTopic"" method=""post"" action=""38324785_post_info.asp"""


Thanks, won't prevent them from registering new accounts but no more new threads ! Can I use this type of trick to prevent them from replying to existing threads ? Which file should I modify for that?<
Carefree Posted - 02 November 2008 : 11:23:54
quote:
Originally posted by jitterwocky

I wrote some very similar code to take care of the problem.

--
Dim strSpamEmail
strSpamEmail = Request.Form("Email")
Dim strSpamIP
strSpamIP = "http://" & Request.ServerVariables("REMOTE_HOST")
if InStr(1,strSpamEmail,"@u-yep.com",1) > 0 then
response.redirect strSpamIP
end if
--

I found I had to Dim my variables before putting them in the InStr code otherwise valid registrants would be shown a Snitz error message. Perhaps that has something to do with my particular version of VBScript.

The "1"s in the InStr code make it so that case doesn't matter.

My favorite part is redirecting the spam bot back to its own server via REMOTE_HOST. If enough Snitz forums used this code then the spammer servers would essentially initiate a mild denial-of-service attack against themselves.





The problem with this is that you'd have to list all of the servers (again) in the code, line by line. Instead, try this approach - I've got the spam servers in a dbase table:
'Anti-ForumPoster code
Dim isSpambot : isSpambot = 0
Dim strSpamEmail : strSpamEmail = Request.Form("Email")
Dim strSpamIP : strSpamIP = "http://" & Request.ServerVariables("REMOTE_HOST")
agent = LCase(Request.ServerVariables("HTTP_USER_AGENT"))
If InStr(agent, "forum poster") > 0 Then isSpamBot = 1
set rss = my_conn.execute("SELECT SPAM_SERVER FROM FORUM_SPAM_MAIL")
rss.MoveFirst
While not rss.EOF
	strSPAM_SERVER="@"&rss("SPAM_SERVER")
	if InStr(1,strSpamEmail,strSPAM_SERVER,1) > 0 then isSpamBot = 1
rss.MoveNext
wend 
rss.Close
set rss=Nothing
If InStr(agent, "fp.icontool.com") > 0 Then isSpamBot = 1
If InStr(agent, "icontool") > 0 Then isSpamBot = 1
If isSpambot = 1 Then Response.Redirect("http://" & Request.ServerVariables("REMOTE_ADDR"))
'End Anti-ForumPoster Code


The original instructions for a more limited version of this required it to be put in "config.asp". That won't work with my addition, because the connection string hasn't been configured. Instead, I added it to "inc_header.asp" and "inc_header_short.asp". Now, it'll redirect the abuser regardless of which spam server he/she is using.<
Podge Posted - 02 November 2008 : 09:53:00
quote:
Any hints on what that work would be, I'm getting hammered by theses idiots !

In the short term you could try renaming post_info.asp to something random like 38324785_post_info.asp
You will need to edit post.asp so that line 494 is changed from
		"              <form name=""PostTopic"" method=""post"" action=""post_info.asp"""

to
		"              <form name=""PostTopic"" method=""post"" action=""38324785_post_info.asp"""
<
AnonJr Posted - 02 November 2008 : 06:41:52
Not off the top of my head.

Last week (and probably this month) things are rather nuts around the hospital. I've worked every day since last Sunday, and I probably won't get a day off until Friday at the earliest. I was away at Greensboro for a 4 day training course and they kept calling and e-mailing, and I had to take my breaks and evenings to remote in and handle some of the most irrational requests I've had since I started working there. Hasn't left much time for more than a cursory run through the posts... sorry about that.
<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07