View Full Version : [release] Spambot Protection
filburt1
03-07-2003, 10:00 PM
Author: filburt1
Description: a powerful, admin CP-integrated set of options to automatically perform actions on users and posts who appear to be flooding your forums with spam. This is a relatively complicated mod to install so read the instructions. Requires PAPI 1.0.8.
Screenshot: attached for admin CP, n/a for actual usage
Read This!
The number of queries that this mod uses is dynamic but execute on every page. If you are not in the Registered usergroup or have turned off the spambot protection, it uses none. If you only monitor spam threads or replies, it uses one query; if you monitor for both, it's two queries.
The query for actually detecting spam is relatively server-intensive. However, if you make the threshold higher, the query gets much more intensive. Choose an intelligent value. Something along the lines of 100 could cripple your server because the query would have to search the entire huge post table before quitting.
So, if you have a large board, configure with intelligence!
This better work for everybody, that's all I can say *yawn* :( I do expect people to report bugs to the complexity of the mod so I'll be ready for them...tomorrow.
joeboo
03-08-2003, 05:14 AM
Sounds promising. I may one day install this if I get too much spam. Thanks for the mod
Tony G
03-08-2003, 08:52 AM
I'll test it out for you if needed, nice work and you get some rest now. ;)
filburt1
03-08-2003, 12:37 PM
I already know of one bug off the top of my head which I'll try fixing today but dammit it requires editing both PAPI and this mod ;(
filburt1
03-08-2003, 12:55 PM
I'll test it out for you if needed, nice work and you get some rest now. ;)
Please do, thanks, and I never want to stay up to 2 AM coding PHP again :o
Rufus69
03-08-2003, 01:30 PM
oooooooo
/me clicks the Install button.
/me realizes that mod isn't installed,
/me cries.
filburt1
03-08-2003, 03:20 PM
I uploaded a new version. If you already had this installed:
1. Reapply the phpinclude edit
2. Upload the new (1.0.8) version of PAPI
filburt1
03-08-2003, 05:44 PM
So, can somebody test this? Just create a dummy user, log in as him, and spam your board.
filburt1
03-09-2003, 04:43 PM
So, can somebody test this? Just create a dummy user, log in as him, and spam your board.
Why are the coolest and most functional mods never installed? :(
jrotunda85
03-09-2003, 11:01 PM
I will install this on my test board and test it out :).
jrotunda85
03-09-2003, 11:28 PM
Ok, Filburt.
I installed everything and everything is working fine, except for when I try to do things with the users I registered. For some reason, everytime I try to post with that user I get a database error and I got it occassionally with trying to log-in. The interesting thing is I can do everything just fine with the admin account, including posting, logging back in, etc. So I assume it must be something with the database modifications.
Help :confused:
filburt1
03-09-2003, 11:31 PM
What's the database error?
jrotunda85
03-09-2003, 11:53 PM
It's just giving me the generic "There has been an error in the Senate Sim database." It doesn't give me the report like where it's coming from or anything.
filburt1
03-09-2003, 11:54 PM
Right-click the page, click View Source, and copy the error.
jrotunda85
03-10-2003, 12:10 AM
This is the one I am getting when trying to log in. It appears, it does have something to do with the hack because it denotes 6 which is the number of posts I set in the Board Options.
<html><head><title>Senate Sim Version 3.0 Database Error</title><style>P,BODY{FONT-FAMILY:tahoma,arial,sans-serif;FONT-SIZE:11px;}</style><body>
<!-- Database error in vBulletin 2.3.0:
Invalid SQL: SELECT
IF(COUNT(threadid) >= 6, 6, COUNT(threadid)
FROM thread WHERE postuserid = 12
AND dateline > UNIX_TIMESTAMP() - 30
mysql error: You have an error in your SQL syntax near 'FROM thread WHERE postuserid = 12
AND dateline > UNIX_TIMESTAMP() - 30' at line 3
mysql error number: 1064
Date: Sunday 09th of March 2003 07:05:58 PM
Script: http://www.senatesim.com/testvb/testvb/index.php?
Referer: http://www.senatesim.com/testvb/index.php?
-->
</table></td></tr></table></form>
<blockquote><p> </p><p><b>There seems to have been a slight problem with the Senate Sim Version 3.0 database.</b><br>
Please try again by pressing the <a href="javascript:window.location=window.location;">refresh</a> button in your browser.</p>An E-Mail has been dispatched to our <a href="mailto:support@senatesim.com">Technical Staff</a>, who you can also contact if the problem persists.</p><p>We apologise for any inconvenience.</p></blockquote></body></head></html>
filburt1
03-10-2003, 12:14 AM
Sh**, I forgot a closing paren in PAPI 1.0.8. Uploading new version, stand by.
filburt1
03-10-2003, 12:17 AM
Try upgrading to PAPI 1.0.9 and see if it helps.
jrotunda85
03-10-2003, 12:26 AM
Still getting it:
<html><head><title>Senate Sim Version 3.0 Database Error</title><style>P,BODY{FONT-FAMILY:tahoma,arial,sans-serif;FONT-SIZE:11px;}</style><body>
<!-- Database error in vBulletin 2.3.0:
Invalid SQL: SELECT
IF(COUNT(threadid) >= 6, 6, COUNT(threadid)
FROM thread WHERE postuserid = 12
AND dateline > UNIX_TIMESTAMP() - 30
mysql error: You have an error in your SQL syntax near 'FROM thread WHERE postuserid = 12
AND dateline > UNIX_TIMESTAMP() - 30' at line 3
mysql error number: 1064
Date: Sunday 09th of March 2003 07:22:58 PM
Script: http://www.senatesim.com/testvb/testvb/index.php?
Referer: http://www.senatesim.com/testvb/index.php?
-->
</table></td></tr></table></form>
<blockquote><p> </p><p><b>There seems to have been a slight problem with the Senate Sim Version 3.0 database.</b><br>
Please try again by pressing the <a href="javascript:window.location=window.location;">refresh</a> button in your browser.</p>An E-Mail has been dispatched to our <a href="mailto:support@senatesim.com">Technical Staff</a>, who you can also contact if the problem persists.</p><p>We apologise for any inconvenience.</p></blockquote></body></head></html>
filburt1
03-10-2003, 12:51 AM
What are the contents of the floodcheck() function for the version of PAPI that you have?
jrotunda85
03-10-2003, 01:27 AM
What are the contents of the floodcheck() function for the version of PAPI that you have?
It has been attached.
filburt1
03-10-2003, 01:30 AM
Arg, I'm an idiot...download and upgrade PAPI again.
jrotunda85
03-10-2003, 01:40 AM
Still getting it.....here's the "new" copy:
<html><head><title>Senate Sim Version 3.0 Database Error</title><style>P,BODY{FONT-FAMILY:tahoma,arial,sans-serif;FONT-SIZE:11px;}</style><body>
<!-- Database error in vBulletin 2.3.0:
Invalid SQL: SELECT
IF(COUNT(postidid) >= 6, 6, COUNT(postid))
FROM post WHERE userid = 12
AND dateline > UNIX_TIMESTAMP() - 30
mysql error: Unknown column 'postidid' in 'field list'
mysql error number: 1054
Date: Sunday 09th of March 2003 08:35:57 PM
Script: http://www.senatesim.com/testvb/testvb/index.php?
Referer: http://www.senatesim.com/testvb/index.php?
-->
</table></td></tr></table></form>
<blockquote><p> </p><p><b>There seems to have been a slight problem with the Senate Sim Version 3.0 database.</b><br>
Please try again by pressing the <a href="javascript:window.location=window.location;">refresh</a> button in your browser.</p>An E-Mail has been dispatched to our <a href="mailto:support@senatesim.com">Technical Staff</a>, who you can also contact if the problem persists.</p><p>We apologise for any inconvenience.</p></blockquote></body></head></html>
filburt1
03-10-2003, 01:47 AM
You know the drill...;)
Remember I wrote this at 2 AM, unlike HelperBot which was a respectable 8 PM ;) :D
jrotunda85
03-10-2003, 01:51 AM
Um, your attachment is missing on the PAPI thread ;).
filburt1
03-10-2003, 01:53 AM
Odd :confused: It's back.
jrotunda85
03-10-2003, 02:04 AM
Filburt,
Since updating the new PAPI page, it is working. My settings were to close the thread and delete the replies after 6 posts in 30 seconds. While it did work, it did it after 4 replies (total 5 posts), so I am not sure if there is a greater then or something sign messed up.
I have posted some screenshots, you may use them if you wish :).
Note: I called my drone guy 'spammerbot' so don't get confused ;).
filburt1
03-10-2003, 02:06 AM
Try setting it up to only do stuff with threads or replies, but not both.
jrotunda85
03-10-2003, 02:15 AM
Ok, I did it to hide the replies when it hits 6. As I was posting my 6th time all the replies were hiddden so I didn't see the 6th post. I assume this is how it works. :confused:
filburt1
03-10-2003, 02:17 AM
The concurrent deletion is tricky because (I think) a new thread counts as a new reply as well. Therefore two threads and two replies might count as six and then kick in.
jrotunda85
03-10-2003, 02:19 AM
I defintely believe that the new thread counts as part of the "new replies." If it doesn't then it has a bug because it is one short everytime, as far as "replies" goes.
Let me know, I will test new stuff out on my test board if you wish :).
filburt1
03-10-2003, 02:25 AM
Please do continue to test things.
Do you think that it's intuitive how a thread counts as a reply as well?
jrotunda85
03-10-2003, 02:30 AM
Please do continue to test things.
Do you think that it's intuitive how a thread counts as a reply as well?
What would you do without Guinea Pigs? :)
I think its cool, I guess looking at it objectively it should count anyway because even though it isn't a "reply" it is a post. So I like the fact that its counting posts not neccesarily replies. Maybe you should change the install deal to make it posts instead of replies? That way it won't throw people off?
filburt1
03-10-2003, 02:36 AM
True. I don't think it's intuitive myself although I think it should be simple to fix so it doesn't count threads as replies. :)
jrotunda85
03-10-2003, 02:39 AM
BTW, I had enabled the e-mail function and this is what I got, it was from "Apache":
The user "spammerbot" (http://www.senatesim.com/testvb/member.php?action=getinfo&userid=12) appeared to be spamming Senate Sim Version 3.0. Action according to the spambot protection options is taking place. You should visit your site to ensure that no errors occured in the cleanup process.
filburt1
03-10-2003, 10:42 AM
It'll be from whatever your server is set up as. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.