Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Blocking mail.ru when registering
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Zenfor
Junior Member

372 Posts

Posted - 27 November 2008 :  20:02:27  Show Profile
I'm wasting my time by getting constant spam type registrations with mail.ru as the email and I want them automatically deleted without any error message as soon as they register. Without installing a whole mod, is there some few lines of code I could insert that would do something like that? Thanks!<

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 28 November 2008 :  03:19:58  Show Profile
Something like this should do it:

In "register.asp", look for these lines (appx 637-640):
				strMessage = strMessage & "Happy Posting!"

After them, add the following:

				strRFE=right(Request.Form("email"),7)
				if strRFE = "mail.ru" then
					strSql = "DELETE FROM " & strMemberTablePrefix & "MEMBERS_PENDING "
					strSql = strSql & " WHERE strRFE="& "MAIL.RU"
					set rsRFE = my_Conn.Execute (strSql)
					rsRFE.close
					set rsRFE = nothing
				end if
<
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 28 November 2008 :  06:26:18  Show Profile
Thanks but I just tested it and it didn't work, the mail.ru still went into members pending. I even tried it in upper and lower case. Any other ideas?<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 28 November 2008 :  07:04:58  Show Profile  Visit HuwR's Homepage
personally I would do it like this.

in register.asp look for these lines

If strAutoLogon <> 1 then
if Request.Form("Email") = "" then
Err_Msg = Err_Msg & "<li>You Must give an e-mail address</li>"
end if

Imediatly after add the following

if (Instr(lcase(Request.Form("Email")), "@mail.ru") > 0) then
Err_Msg = "<li>Registration failed!</li>" & Err_Msg
end if


this does not write anything to the db, it just fails the registration.
YOU MUST add something to the Err_Msg as this is how the forum determines whether registration failed or not.<
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 28 November 2008 :  07:12:37  Show Profile  Visit MarcelG's Homepage
Zenfor, you say this:
quote:
I'm wasting my time by getting constant spam type registrations with mail.ru as the email and I want them automatically deleted without any error message as soon as they register.
How important is the bold part for you?
Of course, you could turn the 'error message' into something like "Registration succesful", while in reality it is not, but won't this give you more questions from genuine @mail.ru users ?
I just use the error message "The mail domain you're using is blacklisted.", which is very clear as to why the registration was blocked.<

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 28 November 2008 :  07:30:24  Show Profile
quote:
Originally posted by MarcelG
...How important is the bold part for you?
Of course, you could turn the 'error message' into something like "Registration successful", while in reality it is not, but won't this give you more questions from genuine @mail.ru users ?...

My forum is mainly used by local folks within a small USA town. I'm getting several mail.ru registrations each day which appear to be from the Nigerian scammers. Doing some research on mail.ru, it's a Russian mail service famous for use by spammers, scammers, etc.

I've never has a real mail.ru user and don't ever expect to and would rather not give them an error message that alerts them to what is happening.

Thanks!<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 28 November 2008 :  08:12:19  Show Profile  Visit HuwR's Homepage
just providing a registration failed message does not give them any indication as to why it failed so they will have no idea what is happening other than they failed to register<
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 28 November 2008 :  09:25:20  Show Profile
quote:
Originally posted by HuwR

just providing a registration failed message does not give them any indication as to why it failed so they will have no idea what is happening other than they failed to register


Makes sense, so how do I make your code work with a message? Thank you!<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 28 November 2008 :  10:08:42  Show Profile  Visit HuwR's Homepage
the code I posted has a fail message, as I explained it MUST have one in order to work<
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 28 November 2008 :  10:53:18  Show Profile
quote:
Originally posted by HuwR

the code I posted has a fail message, as I explained it MUST have one in order to work


Perfect, that worked like a charm, thank you!<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07