PDA

View Full Version : The self banning or the farewell hack (The AutoBahn)


Zzed
04-16-2003, 10:00 PM
This is yet another way to ban a user from your board.

This hack is a little fun project I thought of given some of the recent events in my forums. We have had a few "trouble makers" on our board who got slammed pretty hard by the board moderators quite rightfully. And they got their fragile feelings hurt and posted threads stating that they never wanted to post on the board and so on so forth...

So I came up with the idea of the Farewell Hack, or as I call it the AutoBahn Hack. As the name suggests, the hack allows a person to automatically ban himself from the board. The unsuspecting victim will post a new thread and type some angry messages in there, and all of a sudden, he is not able to access the board. He has been banned. The hack posts a reply to the thread stating that the person is banend. The thread gets locked, and the person receives an Email notice informing him that he has been banned.

This is the reply given to the post:

Your post indicates that you no longer wish to be a member of this site.

Your ID has been banned.

Contact the site administrators about reinstating your account.

Good bye.


The hack tries to identify certain phrases in the post by performing a series of regex matches and if it finds a match it deems that thread as a farewell thread.

The hack is quite simple. It adds a new .php file to your forums directory and requires a small change to newthread.php. ;)

And yes, mods and admins are immune to this hack.

farewell.php can be slightly tweaked to work according to your board configuration.

The variable $bot_ip is set to 127.0.0.1. You can change it to the IP address of your board.
The variable $admin_uid is set to 1. You can set it to the user ID of anyone on your board.
In the $patterns array, replace "myboard.com" with the name of your board.
Feel free to add patterns of your own to the list. Be suer to follow the rules for regular expression mathces.
And pardon the little profanity in the list. :)

Zzed
04-17-2003, 07:49 PM
Here are 2 samples of this hack in action: :D

http://www.ls1.com/forums/showthread.php?threadid=287146
http://www.ls1.com/forums/showthread.php?threadid=287156

KelteN
04-17-2003, 08:15 PM
lol thats cool :)

SmartGnome
04-17-2003, 08:30 PM
Zzed you made my day :banana:

I have the same on our board, so much users that there are always troublemakers among them.

I will install this tonight

Thanks from all of the the KrissiTeam !!


Greetz


Btw: how do you manage that greetings to us and the workaround the serverload message. I'm interested in that to :D

Zzed
04-17-2003, 08:41 PM
Today at 01:30 PM SmartGnome said this in Post #4 (https://vborg.vbsupport.ru/showthread.php?postid=383498#post383498)
Zzed you made my day :banana:

I have the same on our board, so much users that there are always troublemakers among them.

I will install this tonight

Thanks from all of the the KrissiTeam !!


Greetz


Btw: how do you manage that greetings to us and the workaround the serverload message. I'm interested in that to :D

Thank you for your kind words SmartGnome. :)

I have a hack that disables guest access to my board when the server load is too high. I got a few complaints form people here that they could not see the board during high server loads. So I made a little exception to allow vb.org visitors see the threads that are linked from here. ;)

It's quite a simple hack actually. ;)

Dan
04-17-2003, 08:42 PM
I think I shall install it on my board once I get time..... maybe useful for the idiots that occasionally grace my board.

drumsy
04-17-2003, 08:53 PM
Is there a brief tutorial you can give on modifying the $patterns array?

Mephisteus
04-17-2003, 08:54 PM
Nice hack :) Going to install it right away :)

Zzed
04-17-2003, 09:03 PM
Today at 01:53 PM drumsy said this in Post #7 (https://vborg.vbsupport.ru/showthread.php?postid=383512#post383512)
Is there a brief tutorial you can give on modifying the $patterns array?

Hmm...

To do simple matches you can just type in phrases that look like this:

"/I am leaving this forum/i"

Your pattern should start with / and it should end with /i. That will make it case insensitive. This will match any post containing the above statement. You can add as many simple patterns as you want without getting fancy.

But if you want to get fancy, I suggest a little light reading on regular expressions: ;)

http://www.living-source.com/user/adi/regexp/regexp_tutorial.html
http://gnosis.cx/publish/programming/regular_expressions.html

Boofo
04-17-2003, 09:15 PM
Today at 03:41 PM Zzed said this in Post #5 (https://vborg.vbsupport.ru/showthread.php?postid=383502#post383502)
Thank you for your kind words SmartGnome. :)

I have a hack that disables guest access to my board when the server load is too high. I got a few complaints form people here that they could not see the board during high server loads. So I made a little exception to allow vb.org visitors see the threads that are linked from here. ;)

It's quite a simple hack actually. ;)

I'd like to have that. I also don't allow guests to view messages but would like to be able to allow vb.org people to see threads that I link from here (and only here, if possible). ;)

Logik
04-17-2003, 11:48 PM
This is a slick hack. Very useful :)

Zelda-King
04-18-2003, 12:59 AM
I love it! One thing though. Why are they converted to usergroupid 9 as opposed to 8 (the default bangroup)? I'm assuming your bangroup is 9 but most people's are 8. The one I'm using is 10 actually, but that's custom. :D

Zzed
04-18-2003, 01:04 AM
Thank you guys. :)

Zelda-King, I thought 9 was the standard usergroup ID for banned users. :confused:

Link14716
04-18-2003, 03:06 AM
Yea, 8 is the standard, but they also may be 10, 11, 9349853, etc. ;)

Better make that a variable to edit in the config. ;)

I'll install this once I am able to log into my FTP... damn, it's going tooooo sloooooow.

Logik
04-18-2003, 05:36 AM
I hate when that happens.
Its probably some wanna-be-hacker pingin your host's IP.

Mike11212
04-18-2003, 11:19 AM
lol i would install this but I got a few members who get a kick out of doing this and and I just love making them look like idiots and it might ban those who don't want to be banned

Zelda-King
04-18-2003, 12:24 PM
We could think up some extra phrases here that people might actually use. I had fun thinking up a few last night. :D

Usergroupid 9. I don't have one. It was a custom usergroup which I've deleted. The hack therefore just set users to usergroup 4 (COPPA/Users Awaiting Moderation).

The problem with the usergroup 'Banned by Moderators' is it's created when a moderator first bans. If you've already added usergroups prior to that then the usergroupid for it will be different. If you don't add any usergroups then it should be 8. At least I think that's how it works.

Dean C
04-18-2003, 01:02 PM
Just amazing zzed ;)!

ryancooper
04-18-2003, 02:55 PM
This is a Great hack. personally i won;t use it but I love it!! LOL

Zelda-King
04-19-2003, 02:36 AM
When I post only one word of a 'ban phrase' I get the attached error. Everything seems to still function normally, and the user isn't banned without saying the rest of it but I get the error come up briefly nevertheless.

For example, if a ban sentence is "I'm leaving" and I post the word 'leaving' in a different context, there's that error.

One word is enough to make the post require farewell.php. Isn't there a way of making it not do that unless all criteria are met for an autoban?

Zzed
04-19-2003, 03:18 AM
Today at 07:36 PM Zelda-King said this in Post #20 (https://vborg.vbsupport.ru/showthread.php?postid=384019#post384019)
When I post only one word of a 'ban phrase' I get the attached error. Everything seems to still function normally, and the user isn't banned without saying the rest of it but I get the error come up briefly nevertheless.

For example, if a ban sentence is "I'm leaving" and I post the word 'leaving' in a different context, there's that error.

One word is enough to make the post require farewell.php. Isn't there a way of making it not do that unless all criteria are met for an autoban?

This is due to some regex syntax error in your list of patterns.

Email me the contents of your array and I'll give you back the corrected list. ;)

My Email is: edwink@seebeyond.com

Zelda-King
04-19-2003, 03:39 AM
OK, I sent it. :)

Zzed
04-19-2003, 08:43 AM
I copied and pasted them in my farewell.php and I tried 2 different posts.
In the first one I said "I'm leaving" and the hack kicked in. And in the other one I said "blah blah leaving" and nothing happened. But I did not get any errors either. I am not sure why you are getting that error. Maybe you can tell me what exact phrase causes that error.

On a different note, you don't need various upper/lower case combination of words. The /i makes the regex case insensitive. ;)

Zelda-King
04-19-2003, 10:23 AM
I just tried Leaving. Testing something here. and got the error.

I tried blah blah blah blah leaving and it was fine. No ban either.

Zzed
04-19-2003, 10:34 AM
Check your PM's please. :)

Zzed
04-19-2003, 10:56 AM
I am completely stumped. It is workig just fine on my site...

Let's try and narrow it down to the actual regex that causes this.

Find:

while(($found == 0) and ($x < $entries)) {


And add this directly below it:

echo "$patterns[x] \n";


This will list out all the patterns and you will see the error message right after the culprit. This way we can at least narrow it down to the actual pattern. ;)

Zelda-King
04-19-2003, 11:04 AM
I just did that and now that sentence gives me no error. O_O

In fact, I reuploaded the old one and got no error either, yet I had changed NOTHING! I'm going to try some more phrases.

Well then, it's nothing to do with code fault whatever it was. :/

Zzed
04-19-2003, 11:25 AM
It ran just fine on my board too.

I'm glad to hear it's working now. :)

Martin64
04-19-2003, 12:22 PM
Heh, funny, but I prefer my moderators to do their job instead of trusting patterns. Great idea though, but it's nothing for me. :)

Craigr
04-19-2003, 01:30 PM
Thanks i'll install this later.

Craig

partang2
04-20-2003, 06:32 AM
Nice!

*Clicks Install*

Paul
04-21-2003, 02:34 AM
What about "suicide autobahners?" ;) I could see this being a potential problem: Sign up with an account, make a comment in a popular thread about wanting to leave the site, and instantly closing the otherwise useful thread? Does this only check for the first post in a thread?

Interesting concept, to say the least.

Zzed
04-21-2003, 03:53 AM
Today at 07:34 PM LoveShack said this in Post #32 (https://vborg.vbsupport.ru/showthread.php?postid=384956#post384956)
What about "suicide autobahners?" ;) I could see this being a potential problem: Sign up with an account, make a comment in a popular thread about wanting to leave the site, and instantly closing the otherwise useful thread? Does this only check for the first post in a thread?

Interesting concept, to say the least.

This hack works for new threads only. Any replies made to an existing thread will not trigger this hack. ;)

XP Kid 86
04-29-2003, 10:26 PM
What happends if you reply .. this doesnt edit the reply post .. or edit post .. what about that?

Zzed
04-29-2003, 10:31 PM
Today at 04:26 PM XP Kid 86 said this in Post #34 (https://vborg.vbsupport.ru/showthread.php?postid=389134#post389134)
What happends if you reply .. this doesnt edit the reply post .. or edit post .. what about that?

This hack is intended only for new threads. But you can make similar changes to newreply.php and get the same results. ;)

MaDCaT75
09-03-2003, 08:01 PM
I'll stick with the miserable user hack instead :p

Silver740
09-04-2003, 03:31 PM
I got this error after I tested a trigger effect:

Parse error: parse error, expecting `')'' in /home/bmwexpe/public_html/forum/farewell.php on line 21

Fatal error: Call to undefined function: do_farewell() in /home/bmwexpe/public_html/forum/newthread.php on line 337

Silver740
09-04-2003, 03:37 PM
Nevermind I got it figured out. :)

heynurse
03-19-2006, 02:56 PM
I see this is an old thread, but just wanted to know if anyone has seen a hack like this for vb 3.5? We have a few trolls that come on and post smut (usually certain phrases) that it would be nice to auto ban and remove their post :)

I just posted a request in the 3.5 forums here:
https://vborg.vbsupport.ru/showthread.php?p=929212#post929212

Hornstar
03-21-2006, 10:56 PM
this hack is really cool lol, wish it was for 3.5 as well

Zzed
03-28-2006, 08:02 AM
Wow I never thought anyone would have interest in a 3.5 version. I'll see if I can turn it into a plugin. :)

KidCharlemane
04-12-2006, 02:28 PM
Wow I never thought anyone would have interest in a 3.5 version. I'll see if I can turn it into a plugin. :)


Please do.. I could SO use this.

I get so many "This forum sucks. Please delete my account and all of my posts" posts, this would be ownage to those guys.

CypherSTL
04-29-2006, 05:35 AM
I do a gaming forum and get some ppl that always want to flame it, and this would be a great way to help with the moderation of things like that, useing automation instead of manpower to have to deal with it...thats gets tedious.

Would love this on 3.5.x