Anti-Bot Modification for Snitz Forum

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/68098?pagenum=1
05 November 2025, 04:05

Topic


MrMike2000
Anti-Bot Modification for Snitz Forum
17 January 2009, 21:01


I apologize in advance if this isn't the correct forum to post this in; it seemed the most applicable one that I saw.
Due to the rather aggressive increase in bot activity that I've seen across many of my forums, I've developed "bot buster" mod and I'm offering it to the Snitz community (and several of the other major message boards as well).
I've bundled up a drop-in BotBuster mod for Snitz that people are welcome to use. Technically it's not 100% "drop-in", but it's very, very close. It's all self-contained in one file, requires NO database modifications, and should require only one minor edit to the registration file. (You'll also want to set a couple of very simple configuration options in the BotBuster file, but that's it.)

It uses the http://BotScout.com API to check registration emails and reject known bots. Because it uses the BotScout API you don't have to host anything, change your database, or do any complicated modifications to your code. BoutScout.com keeps a list of emails, IPs, and user names that bots use and makes them available through a simple API (as well as manual searches).
Full Disclosure:
I'm the owner/operator of http://BotScout.com. What we do is trap bots by using a large number of "bot honeypot" forms located on a bunch of our sites. We then publish that information so people can use it to screen registration attempts. smile

I've included configuration options for SMF, VBulletin, phpBB, Phorum, PunBB, Invision Power Board, FUDForum, Ikonboard, Snitz, and W-Agora. It can be used on virtually any kind of forum, contact page, or web form.
The code and a ReadMe file are available for download here: http://www.botscout.com/code.htm (click the "Download BotScout BotBuster ver. 1.10" link). If you use it I'd love to hear about it.
If anyone would like to write up specific installation instructions for the Snitz Forum code, I'll gladly include it in the ReadMe.txt file.
Also, if anyone would like to create a Snitz-specific mod or plugin using the BotScout API, I'd be very interested in helping and would be happy to publish the code or a link to the mod on the BotScout site. The API is simple and easy-to-use, and the API details can be found here: http://botscout.com/api.htm.
MrMike
http://BotScout.com <

 

Replies ...


Classicmotorcycling
18 January 2009, 01:12


Don't know how this relates to Snitz due to the code that you show on your site requires PHP. Snitz is an ASP based forum.<
Podge
20 January 2009, 09:21


Its an easy enough thing to do to write a mod to take advantage of either BotScouts API or StopForumSpam's API. It will require use of the XMLHTTP component to do the GET request though.
I'll have a go later and see what I come up with.<
Podge
20 January 2009, 14:34


I've it nearly finished but I'm waiting on an API key before I can test it properly.<
MrMike2000
20 January 2009, 18:29


Originally posted by Podge
I've it nearly finished but I'm waiting on an API key before I can test it properly.
Ah, great. Please let me know if you don't receive the API key. We'd be glad to post your mod on the BotScout site in the downloads section when you have it done (or a link to it if you prefer).

I'm not sure about the XMLHTTP component (is that for IIS, perhaps?), but the sample code uses cURL which is included with most PHP installs these days. We had/have another person looking at doing one with fopen() but I'm not sure what the advantage(s), if any, would be.

We'd be interested in any ASP code that you get working- we don't have an ASP server available to us so we can't do any development on that platform.
<
Podge
20 January 2009, 19:17


I haven't gotten the API key yet. I used my username here (Podge) and a yahoo.com email address.
How many lookups do you get before you must register ?<
MrMike2000
20 January 2009, 20:12


Originally posted by Podge How many lookups do you get before you must register ?
Right now I think it's 20, but we'll probably raise that depending on the load and demand.<
MrMike2000
20 January 2009, 20:27


Christ, it's been one of those days. I inadvertently deleted your API key (yes, I'm an idiot). If you would, please sign up once more. (sigh)<
Podge
21 January 2009, 07:12


Done.<
MrMike2000
21 January 2009, 08:16


Thank you. I also sent it to you manually in case the automated email doesn't show up for some reason.

Please let me know if you have any questions or if there's anything I can do to help.
<
Podge
21 January 2009, 11:21


Got it. At work at the moment so I'll have a look at it in a few hours when I get home.
At the moment its designed to stop registrations only. Should I include code that tests posts as well in case spammers register on a forum before the mod is applied ?
I'm also going to design an admin page so that features can be turned on and off.
Any other features people would like ?<
MrMike2000
21 January 2009, 13:59


Originally posted by PodgeGot it. At work at the moment so I'll have a look at it in a few hours when I get home.
Super.
I have to say, the response from the Snitz, phpBB, FUDForum, and SMF communities has been very positive, with a lot of interest and people contributing code and ideas.

The PunBB community wasn't too excited, but they said it looked nice, while the nice folks at Phorum basically told me to piss off and accused me of attacking them, lol.
On another note, we're working hard on a very naughty "Bot Baffler" trapping service. :) People will be able to place a tiny snippet of code on their page (like in a footer file) and have it dynamically pull a bot-trapping form from our site. The form is completely dynamic- the fields change every time, including the field lengths and names. It's pure evil for bots to mess with and it'll be nearly impossible for a bot to "know" that it's a trap and avoid it. :)

This will allow people to contribute new bots to the BotScout database without having to do anything besides placing a small include() statement in their page. Mwuahahaha.<
AnonJr
21 January 2009, 17:54


Well, I've got to admit that my initial reaction to your first post was "is this legit or is this spam?" That was largely due to your very first post sounding more like an ad than anything else. Add in the links and that you're not a "known member" - as in someone who's contributed/participated other things around here before - and it raised a few of my personal red flags. Just FYI.<
Podge
21 January 2009, 18:10


I've used two different methods to parse the responses and need some volunteers to test the code.

First save the following text as inc_func_spam.asp
Code:
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.06
'#################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version. '##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet. '##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details. '##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################

function botCheck(ipAddress, emailAddress, Username)
botCheck = 0
strBotScoutAPIKey = "whatever_your_key_is" ' register at botscout to get your key
Dim objXMLHTTP, xml
Dim apiKey
Dim responseArray
Dim ipResponse, usernameResponse, emailResponse

Set xml = Server.CreateObject("Microsoft.XMLHTTP")
' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

xml.Open "GET", "http://botscout.com/test/?multi&name=" & Username & "&mail=" & emailAddress & "&ip=" & ipAddress & "&key=" & strBotScoutAPIKey, False
xml.Send

responseArray = Split(xml.responseText, "|")

ipResponse = responseArray(3)
usernameResponse = responseArray(5)
emailResponse = responseArray(7)

botCheck = CLng(ipResponse) + CLng(usernameResponse) + CLng(emailResponse)

Set xml = Nothing
end function

function stopForumSpamCheck(ipAddress, emailAddress, Username)
stopForumSpamCheck = 0
Dim xmlDoc
Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async=false
xmlDoc.setProperty "ServerHTTPRequest", true

xmlDoc.load("http://www.stopforumspam.com/api?ip=" & ipAddress & "&username=" & Username & "&email=" & emailAddress)
if xmlDoc.parseError.errorcode <> 0 then
'Response.Write("XML Error...<br>" & xmlDoc.parseError.reason)
else
set oNode = xmlDoc.documentElement.selectSingleNode("frequency")
if not oNode is nothing then
ipResponse = cLng(oNode.text)
end if
end if

set nodeCol = xmlDoc.documentElement.selectNodes("frequency")

for each oNode in nodeCol
stopForumSpamCheck = stopForumSpamCheck + CLng(oNode.text)
next

Set myXml = Nothing
end function
%>
[/code]
You must register with BotScout to receive an api key. Change the following line in inc_func_spam.asp to include your api key
Code:
strBotScoutAPIKey = "whatever_your_key_is" ' register at botscout to get your key

register.asp
Around line 35 find
Code:
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp"-->
<!--#INCLUDE FILE="inc_profile.asp"-->
<%
[/code] replace with
Code:
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp"-->
<!--#INCLUDE FILE="inc_profile.asp"-->
<!--#INCLUDE FILE="inc_func_spam.asp"-->
<%
[/code] Around line 408 find
Code:
			UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" then
UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
end if
[/code] replace with
Code:
			UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" then
UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
end if

Response.write botCheck(UserIPAddress, Request.Form("Email"), Request.Form("Name")) & "<br />"
Response.write stopForumSpamCheck(UserIPAddress, Request.Form("Email"), Request.Form("Name")) & "<br />"

if botCheck(UserIPAddress, Request.Form("Email"), Request.Form("Name")) > 3 then
Err_Msg = Err_Msg & "<li>BotCheck: you have a spam score of:" & botCheck & "</li>"
end if

if stopForumSpam(UserIPAddress, Request.Form("Email"), Request.Form("Name")) > 3 then
Err_Msg = Err_Msg & "<li>StopForumSpam: you have a spam score of:" & stopForumSpam & "</li>"
end if
[/code]<
Podge
21 January 2009, 18:21


MrMike2000, I've included code for both BotScount and StopForumSpam above. Once the code is tested and finished I'll package a zip file containing only the code you need.<
MrMike2000
21 January 2009, 20:36


Originally posted by AnonJr
Well, I've got to admit that my initial reaction to your first post was "is this legit or is this spam?" That was largely due to your very first post sounding more like an ad than anything else. Add in the links and that you're not a "known member" - as in someone who's contributed/participated other things around here before - and it raised a few of my personal red flags. Just FYI.
I understand. I didn't want to sound like a spammer, but I think anytime someone who's unknown (like me) pops up and starts promoting something, the alarm bells go off. My apologies for that.

For what it's worth, I've been running forums and building sites for quite a while, going on 10 years now. I've dealt with forum trolls and spammers for years but in the last year or so it's gone through the roof, so to speak. They're ruining the net for everyone and the worst part is, they're succeeding.

I remember when I didn't get spam, now I get over a 1,000 emails a day and all but 4 or 5 are spam. The days of running an open forum are long gone...allowing guests to post is risky and it's certain to be abused if you don't take measures in advance.

One of my forums is "open" for guests to post in and I've had to add code that prevents posting unless the user has 30 "real" posts to his or her name. And still they try, by s p a c i n g o u t the URLs, posting in unicode, etc etc. Now they post spam in their signatures and don't even post on the board.

BotScout is my contribution to helping try to keep a lid on things. It's my way of helping push their filthy little heads under the water and making their life miserable. If enough people implemented the Bot Buster code it would really cramp their style, and if people use the bot trapping service it'll hurt them even more. smile
<
bobby131313
21 January 2009, 20:42


Mike I think the problem Phorum had was not your first post, I think it was the reference to them not being popular that set him off. Ever tell a die hard Mac user that they've never gotten a virus not because they are so secure, but because no one cares enough to write one for them? blackeye
OK, back to topic... Is there any data on false positives yet? For example, what if an AOL proxy IP gets in your DB mistakenly? Could block 100K people accidentally.<
MrMike2000
21 January 2009, 23:46


Originally posted by bobby131313OK, back to topic... Is there any data on false positives yet? For example, what if an AOL proxy IP gets in your DB mistakenly? Could block 100K people accidentally.
Yup, it's possible. We recommend checking the email first and foremost- that's the most reliable indicator. We don't have any false positive data, and to be honest, I'm not sure how we'd collect or verify it. If you have any ideas we'd be interested in hearing them.

Here's how it breaks out:
Email - the single most reliable indicator of a bot. 99.9% or better. IP - the second most reliable indicator of a bot. 95% or better. Name - the least reliable indicator of a bot. Varies too much to be assigned a real percentage. Maybe 30%.
If both the email and IP match, that's pretty conclusive. You can actually check all three parameters (IP, email, and name) by using another query type that we just added to the API. The new query request type is 'MULTI', and a correctly formatted URL will appear like this (this wouldn't format correctly here so I had to leave off the "http://):

Code:
botscout.com/test/?multi&name=krasnhello&mail=krasnhello@mail.ru&ip=84.16.230.111&format=xml
1) The 'multi' parameter must be present to trigger the 'MULTI' type test

2) Notice that there is no value after the 'multi' parameter in the GET string. Any value assigned to the 'multi' parameter will be ignored.
3) Each field item (name, ip, email) must be explicitly assigned as a "name=value" pair.
4) The order of the field items doesn't matter, but they must all be present or the system will kick out the following error: Missing or Malformed Data for MULTI test.
The MULTI test will return the following XML structure (if 'format=xml' is specified):

Code:
<response>
<type test="IP">
<matched>Y</matched>
<count>3</count>
</type>
<type test="MAIL">
<matched>Y</matched>
<count>0</count>
</type>
<type test="NAME">
<matched>Y</matched>
<count>2</count>
</type>
</response>

The field order (IP, MAIL, NAME) will not vary and all of the the top-level elements will be returned each time with a secondary 'match' and 'count' element .
By omitting the 'format=xml' option the data can also be returned as a standard format of a pipe-delimited string, which would look similar to this:
Y|MULTI|IP|3|MAIL|1|NAME|2
In the pipe-delimited format, if any of the elements match then the first field will be a 'Y'. If none of them match then it's returned as 'N' (but with the rest of the fields still present).
Please note that the MULTI test is most useful if you intend to implement some sort of threshold-based scoring. You could, however, use it to get the email and IP 'match' values and decide based on those two alone. Otherwise, we recommend just checking the email address.<
Shaggy
22 January 2009, 04:21


Originally posted by MrMike2000 Name - the least reliable indicator of a bot. Varies too much to be assigned a real percentage. Maybe 30%.
Also, a legit member could also be using one of the blacklisted usernames.
<
Podge
22 January 2009, 05:08


I'm using the MULTI format to check for bots in the code above.

If the ip and email return a count of 1 and 1 respectively does that mean its a bot ? Or should the threshold for the count be higher ? I couldn't find any php code that implemented a threshold.<
Shaggy
22 January 2009, 05:25


Personally, I'd say that's pretty conclusive, Podge; I'd actually stop the registration on the e-mail alone.
<
MrMike2000
22 January 2009, 06:19


Originally posted by Podge If the ip and email return a count of 1 and 1 respectively does that mean its a bot ?
If both the IP and the email match, chances are overwhelming that it's a bot.

As Shaggy said, personally I'd stop the registration on the e-mail alone. The email address is dead giveaway since real users will never have the same email as a bot.<
Podge
22 January 2009, 06:44


Suppose a legit (but stupid) user registers on one of your honeypot forums. Does this automatically mean that they are a spammer ? What if someone deliberatley sets out to tarnish someone's email address and manages to spoof their i.p.? From your records do you know if there are many spams reported with very small counts (i.e. 2 or less)?
How about these features for the Spam Control Admin Area

1. Auto lock members posting spam (for bot that registered before bot prevention mod was added to a forum
2. Set spam threshold
3. Toggle Register botcheck
4. Toggle Post botcheck
5. Create member and lock at registration if botcheck fails
6. Email Administrator notifications of botcheck failures
7. Set BotScout api key

Any others ?
<
JJenson
22 January 2009, 07:33


Podge personally I would like a list from the admin area to see which accounts were caught by this script in a list in the admin area. I personally don't have emails sent to me from the forum on anything.<
Podge
22 January 2009, 09:00


I'm not that much in favour of adding too much db stuff other than in FORUM_CONFIG_NEW. What I could do is give the option to create a normal member account and lock it straight away but give them a member title to read "SPAM Bot" or something similar. That way they could never register again with the same email address if the forum admin removes the mod or the botscout service is down/withdrawn, etc.
Anyone test the code for me ? I'm mainly interested to see if the xml components work for everyone. Some people may need to change these lines of code.
Code:
  Set xml = Server.CreateObject("Microsoft.XMLHTTP")
' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")

<
MrMike2000
22 January 2009, 12:53


Originally posted by Podge
How about these features for the Spam Control Admin Area

1. Auto lock members posting spam (for bot that registered before bot prevention mod was added to a forum
2. Set spam threshold
3. Toggle Register botcheck
4. Toggle Post botcheck
5. Create member and lock at registration if botcheck fails
6. Email Administrator notifications of botcheck failures
7. Set BotScout api key

Any others ?
Wow, these would be great options. The only one I'm not sure of is the threshold setting- there would need to be some sub-options under that I think, so you could set individual options for the IP, email, and name matches.<
Podge
22 January 2009, 15:33


Ok. I'm sold on the i.p. and email address matching = spam i.e. a count of 2 is enough in this case.<
MrMike2000
22 January 2009, 18:40


Originally posted by Podge
Ok. I'm sold on the i.p. and email address matching = spam i.e. a count of 2 is enough in this case.

If anyone is interested, we're looking for 1 or 2 folks who'd like to beta test the bot trapping system. All that's needed is for you to place a single small file on your system somewhere, and then add a simple call to the form server on BotScout. The rub is that we only have the code written in PHP, using cURL to make the call to the form server. It would need to be translated into ASP to work with the Snitz Forum code. sad
A brief explanation of what it does:

The form-server calling code is placed on a page. When the page loads the call is made and the form server prints an invisible form in the page. When a bot sucks up the page it sees the form, fills out the fields, and submits it. The form is submitted to the small file placed on your system.

The reason behind the need for it to submit to the file on your system is that the bots (the bot owners, really) will eventually "learn" to avoid a form that submits directly to BotScout. But submitting the form to the same server that the form is on looks perfectly natural.

The small file on your system simple takes the submitted data and resubmits it to BotScout on the fly, so the bot never knows that it just added itself to the BotScout database. :)

<
Podge
22 January 2009, 19:58


Can you email me the php code and I'll look at it ?
I'm coming down with a cold so I haven't done anything on the mod today sad<
MrMike2000
22 January 2009, 21:26


Originally posted by Podge
Can you email me the php code and I'll look at it ?

I'll email you a copy as soon as I get it into working form. It's close, hopefully tomorrow.<
MrMike2000
22 January 2009, 23:39


Originally posted by Podge
Can you email me the php code and I'll look at it ?

I'll email you a copy as soon as I get it into working form. It's close, hopefully tomorrow.
UPDATE: Errrr. I just realized that it's in PHP. I'll probably need to find someone that's familiar with both languages. sad<
eider
23 January 2009, 07:10


I successfully impletemented the script Had to use Set xml = Server.CreateObject("Microsoft.XMLHTTP")
as well as Set xmlDoc = Server.CreateObject("Microsoft.XMLHTTP")
but it seems to work ...
As our forum is quite young, we do not have that much spammers yet. However, in the 2 weeks it has been up and running, we had 2! One even minutes after I uploaded it!
Let's hope this helps.
Many thanks<
Podge
23 January 2009, 09:24


Mike, I should be able to interpret what the php version is doing. If you email it to me I'll have a look at it and see if it can be implemented with this mod. If its just a form along with some kind of notification to botscout then it should be possible.
There seems to be a wide variety of the Microsoft.XMLHTTP component (I think there are 6 versions) and they don't all support the same properties and methods.
Can you post the inc_func_spam.asp that worked for you in scrollcode tags and also let me know which platform you are hosted on ? i.e. w2000 w2k3, W2k8, win98, NT, etc.

I doubt the code will work on Sun One asp just in case anyone is thinking of installing it on there.<
AnonJr
23 January 2009, 09:59


Originally posted by Podge
I doubt the code will work on Sun One asp just in case anyone is thinking of installing it on there.
Last I checked, Sun One didn't support any of the XMLHTTP objects. Pitty...<
Podge
27 January 2009, 08:35


Just adding a feature here to remind myself later.
1. Auto lock members posting spam (for bot that registered before bot prevention mod was added to a forum
2. Set spam threshold
3. Toggle Register botcheck
4. Toggle Post botcheck
5. Create member and lock at registration if botcheck fails
6. Email Administrator notifications of botcheck failures
7. Set BotScout api key
8. Add whitelist feature<
MrMike2000
28 January 2009, 20:10


Podge,

Is there a completed (or partially completed) code package for Snitz that I can link to, and/or put on the BotScout site?
<
Podge
29 January 2009, 07:22


Not yet. I'll get you something generic that will work for any asp page later today.<
Podge
29 January 2009, 11:54


I've uploaded it here - http://sites.google.com/site/hypodof/botscout

There is a readme.txt in the zip. Feel free to distribute the zip via BotScout if you want.
If someone could have a look over it to make sure there are no problems I have missed I would appreciate it.<
MrMike2000
29 January 2009, 14:07


Super. I've stored a local copy and also linked to the Google Code cache. Thank you!<
MrMike2000
20 February 2009, 07:58


I received this comment from one of my users regarding the use of "Server.CreateObject("Microsoft.XMLHTTP"), so I thought I'd pass it on.
I just took a quick look at the Snitz code and they really shouldn't be using;

Code:
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
If their server doesn't allow MSXML2, they badly need to upgrade MSXML

http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx
The post on the BotScout forum is here:
http://botscout.com/forum/index.php/topic,16.new.html

You may want to talk with him directly, since I don't really know ASP at all. (I don't know anything about the workings of 'Server.CreateObject' so I don't know what to tell you about it or MSXML2.)<
HuwR
20 February 2009, 08:53


In general if you are scripting on the client and assuming you do
not know which version of IE and which version of MSXML your visitors
have installed then you are better off using version independent program
ids as that way if an MSXML version is around that is bound to that
program id you can instantiate it without needing to know about the
exact MSXML version.

The version independent program id for an XML HTTP request object is
Microsoft.XMLHTTP
thus
var httpRequest = new ActiveXObject('Microsoft.XMLHTTP');
creates an XML HTTP request object in IE 5 or later<
Podge
21 February 2009, 11:23


That makes sense HuwR. The code is being run on the server via asp (not javascript) but it should be the same principle.<
cafcportal
13 May 2009, 12:31


Hi,

After putting this code into my site and sorting a couple of syntax errors in the code I am getting the following error when attempting to register, (I used a known bot e-mail address)

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'cLng'

/forum/inc_botscout.asp, line 34

Line 34 is:

botCheck = CLng(ipResponse) + CLng(usernameResponse) + CLng(emailResponse)

What is the problem?
I am NOT an ASP programmer, so please do not flame me if it is obvious to you ;-)

AnonJr
13 May 2009, 12:58


off-the-cuff I'd say that one of the three variables you're trying to convert to a Long data type has a value that can't be converted. Beyond that I couldn't say as I'm not overly familiar with the code in question.
cafcportal
13 May 2009, 13:16


Ok - I fixed it.
The problem was that the Array 7 also had extra characters in. I changed it. My code is now as follows:

inc_botscout.asp
Code:

  Set xml = Server.CreateObject("Microsoft.XMLHTTP")
Set xmlDoc = Server.CreateObject("Microsoft.XMLHTTP")
'Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

xml.Open "GET", "http://botscout.com/test/?multi&name=" & Username & "&mail=" & emailAddress & "&ip=" & ipAddress & "&key=" & strBotScoutAPIKey, False
xml.Send

responseArray = Split(xml.responseText, "|")

ipResponse = responseArray(3)
usernameResponse = responseArray(5)
emailResponse = left(responseArray(7),1)

botCheck = CLng(ipResponse) + CLng(usernameResponse) + CLng(emailResponse)

Set xml = Nothing
end function

my code in register.asp now looks like:
Code:
	
DIM spamScore
spamScore = botCheck(Request.Servervariables("REMOTE_HOST"), Request.Form("Email"), Request.Form("Name"))
if spamScore > 3 then
Response.Write ("BotCheck: you have a spam score of:" & spamScore) ' Tell the user what the problem is
Response.End ' Stop processing
end if

This stops spammers from registering (I hope)

Maybe I can program in ASP after all? ;-)

AnonJr
13 May 2009, 13:42


Glad you got it fixed.
Just do us a small favor and use the not-quite-documented [scrollcode] tags Huw put in these forums to keep the code from stretching the layout. wink
jamminjames
11 July 2009, 16:58


Is there an ASP version of this or any bot-excluding patches ready yet? I can't tell for sure from reading through this forum...
Android
09 December 2010, 02:12


This is for those like myself that are more comfortable with detailed instructions and black and white "this goes exactly here and that goes exactly there" instructions rather then general instructions that leave it up to us to find the ideal spot in whatever page suits our site best..personally that always has me sweating bullets my choices were solid until I suffer the first test drive and it works..(which it always does) but that doesn't seem to matter to my less then confident coding abilities..I'm more of an artist than a script geek..heh..
The spam bot invasion got so bad at my site that I finally gave up banning bots manually from members pending and closed new registration for two months..I opened it yesterday and had a spam bot in members pending before the first hour was up..so I closed it again and came here then over to botscouts

my choices with the installation worked perfectly so I hope the following helps the less confident like myself..
after adding the assigned api key to botscout.asp and uploading it to my /forums/ directory I uploaded a fresh 3.4.07 untouched copy of register.asp .
To line 551 just above the E-mail Validation Mod I added first the entire ("Email") text then the entire "none", "none" text directly below that..hit save, closed my FTP.. reopened registration and left the site to go hide out on the INTERNET the rest of the day(I'm retired)..that evening I built up the courage to return to the site to happily find members pending empty! Just before coming here, my wishes were validated in real time as I witnessed the process in action from the online page make both a spam bot and a web crawler disappear in barely enough time to Google their IP's and identify them!..both the unwanted bots simply vanished at the same time(it appeared since the quickest setting on auto refresh is one minute) ..but it refreshed then both were gone! Happy daze! ..I'm still riding that cloud of relief and redemption! Thanks to all! Now I'm off to botscout to share the love and pick up one of their linked logos..
It feels all 2009 and peaceful at my site again!

good times!

Android
theZonez Caretaker(10+years and counting)
Android
12 December 2010, 04:32


Unfortunately, my relief was short-lived after it occurred to me that I hadn't yet tested it by trying to register membership. I wasn't but a couple of steps into testing it before the error messages began to appear. Setting off a loud voice in my head telling me I had indeed successfully stopped the bots at the door along with everyone else trying to register! Spread the word! We do not play favorites at theZonez! :D

I've been working on those errors on and off since then without success and not much info specific to this application(from my limited point of view). The Google link from Podge is dead and I see that this thread came to a screeching halt 5 or 6 months ago.
I'm off to my desktop now to put together a detailed report of my attempts and the error messages that resulted from them just in case this seemingly abandoned thread is still being monitored and the instructions to post problems here still holds true..
With this being my very first experience in many years of coming here for upgrades and troubleshooting information, etc. that I wasn't able to access the necessary information in it's entirety and implement it to my site the first try, in my eyes, makes this site the information prototype of excellence! Thank you!
Sincerely,

Android, site caretaker of theZonez

Now failure has arrived!
Hail the great teacher!
Let the lessons begin!
Android
13 December 2010, 23:59


..beings this thread is all but dead I shouldn't feel bad but I still feel a bit guilty..it's fixed and working..I'm just not exactly sure why..sorry...
didn't ever talk to anyone here so have no one to thank with this particular,so I'll just say I'm grateful to you all and thank you!
sincerely,

'droid
AnonJr
14 December 2010, 08:55


The few times I looked, it didn't look like you had a question and its hard to help when its not clear if there is a question, what the question is/where the problem is, and what steps we need to follow to troubleshoot... not trying to be mean or anything, just trying to offer up why the thread appears dead.
Android
15 December 2010, 19:32


No problem! I was so use to never having to question anything since these threads are rich with everything one needs to implement any fix or mod in one graceful motion. Not this time. . I was caught off guard by it. The updated files link was dead, so I used what was available in this thread. All went smoothly as always and it didn't even cross my mind to test it before deciding to come back and leave a post with a finish since it looks like something froze all interest that isn't documented here.
I have a problem asking questions about anything that doesn't already exist to some extent in the thread since my questions are off topic otherwise and maybe none of business I don't know..and every question I had concerned this thread suddenly becoming an oil painting frozen in time without forward motion or closure. What happened? Why is the Google link that still has the introduction "Updates will always be found at this link" not a link anymore? Was war declare between the sites? Were the participants abducted by Aliens?? question
As for my disappointment with the application, maybe I expected too much from Botscout.. since it doesn't do anything that 3.04.7 wasn't already doing. keeping the spam bots out and quarantined(metaphorically) in "Members Pending". I needed them locked outside. Not pending inside. I have no time for routine tasks let alone having to manually ban bot IPs every 2 minutes. It brings up no errors but neither does it do what they promise.
..but thank you for replying even though I wasn't requesting a reply, I'm happy you're still Alien abduction free! Give my regards to the others should they be set free.. I mean, given time and therapy..I'm sure Alien abduntion is very tramatic..lol... bigsmile
Hey! Just a thought! Maybe the Aliens could finish this thread!
..so now you'll know not to mention my asking or not asking questions in the future and just count your blessings I remain silent and simply enjoy the topics quietly without any problems 99% of the time.. wink
cheers!
'droid
AnonJr
15 December 2010, 22:24


If you're looking to keep them out (before they hit the pending registration) you may want to hunt down the thread that talks about rejecting registration attempts with the same first and last names. Unless you're Mitch Mitchell (and not even then) real registrants don't use the exact same first and last names. Its been helpful in keeping out some of the more simple spam bots - but that's another topic for another thread. wink
© 2000-2021 Snitz™ Communications