vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   The self banning or the farewell hack (The AutoBahn) (https://vborg.vbsupport.ru/showthread.php?t=51734)

Zzed 04-16-2003 10:00 PM

The self banning or the farewell hack (The AutoBahn)
 
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:
Quote:

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...hreadid=287146
http://www.ls1.com/forums/showthread...hreadid=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

Quote:

Today at 01:30 PM SmartGnome said this in Post #4
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

Quote:

Today at 01:53 PM drumsy said this in Post #7
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/ad..._tutorial.html
http://gnosis.cx/publish/programming...pressions.html

Boofo 04-17-2003 09:15 PM

Quote:

Today at 03:41 PM Zzed said this in Post #5
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

Quote:

Today at 07:36 PM Zelda-King said this in Post #20
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
Quote:

Leaving. Testing something here.
and got the error.

I tried
Quote:

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:
PHP Code:

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

And add this directly below it:
PHP Code:

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

Quote:

Today at 07:34 PM LoveShack said this in Post #32
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

Quote:

Today at 04:26 PM XP Kid 86 said this in Post #34
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/showthrea...212#post929212

Hornstar 03-21-2006 10:56 PM

this hack is really cool lol, wish it was for 3.5 as well


All times are GMT. The time now is 04:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01283 seconds
  • Memory Usage 1,829KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete