vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   My first "hack" (https://vborg.vbsupport.ru/showthread.php?t=9155)

Peter Porker 02-19-2001 11:57 AM

I don't know if this exists already, or even if it's included in v2.0, but here it is in any case:

(this wasn't hard to come up with, but still, not bad for a dude who doesn't know php, eh? ;) )

To add banning by ICQ Number, AIM Handle, Yahoo Handle: (only tested in version 1.1.4)
-------------------------------------------------------
################################################## ###########
Files to edit -> member.php
admin/options.php
-> need to add 3 new templates (VERY SIMPLE!)
################################################## ###########

######## IN "member.php" FIND: (should be around line 153)
(FOUND UNDER THIS HEADING: // ############################### start add member ###############################)

if (strstr(" ".$banemail." "," ".$email." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_ban email")."\");");
exit;
}
if ($emaildomain=substr(strstr($email,"@"),1)) {
if (strstr(" ".$banemail." "," ".$emaildomain." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_bad email")."\");");
exit;
}
}

------- DIRECTLY UNDER THAT, ADD:

if (strstr(" ".$banicq." "," ".$icq." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_ban icq")."\");");
exit;
}
if (strstr(" ".$banaim." "," ".$aim." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_ban aim")."\");");
exit;
}
if (strstr(" ".$banyahoo." "," ".$yahoo." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_ban yahoo")."\");");
exit;
}

------- THAT BLOCK OF CODE SHOULD NOW LOOK LIKE THIS:

if (strstr(" ".$banemail." "," ".$email." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_ban email")."\");");
exit;
}
if ($emaildomain=substr(strstr($email,"@"),1)) {
if (strstr(" ".$banemail." "," ".$emaildomain." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_bad email")."\");");
exit;
}
}
if (strstr(" ".$banicq." "," ".$icq." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_ban icq")."\");");
exit;
}
if (strstr(" ".$banaim." "," ".$aim." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_ban aim")."\");");
exit;
}
if (strstr(" ".$banyahoo." "," ".$yahoo." ")!="") {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_ban yahoo")."\");");
exit;
}
}

####################################

####### IN "admin/options.php" FIND: (should be around line 537)

<td><p><b>banemail</b></p></td>
<td><p><input type=\"text\" size=\"35\" name=\"newoption[banemail]\" value=\"".htmlspecialchars($banemail)."\"></p></td>
</tr>
<tr><td colspan=2><p>Email Ban Lists: You may ban certain email addresses from registering on your forums. To ban a specific email, type the full email address (as in, waldo@whereiswaldo.com). To ban all email addresses from certain domains, such as hotmail, simply type the domain name (as in hotmail.com)- that will prevent anyone using a hotmail address from registering. Put a space between each banned email.<br></p></td></tr>
<tr><td colspan=2><p><hr></p></td></tr>

------ ABOVE THE LAST LINE ( <tr><td colspan=2><p><hr></p></td></tr> ), ADD:

<tr>
<td><p><b>banicq</b></p></td>
<td><p><input type=\"text\" size=\"35\" name=\"newoption[banicq]\" value=\"".htmlspecialchars($banicq)."\"></p></td>
</tr>
<tr><td colspan=2><p>ICQ Ban Lists: You may ban certain ICQ numbers from registering on your forums. To ban a specific ICQ number, type the full number. Put a space between each banned ICQ number.<br></p></td></tr>
<tr>
<td><p><b>banaim</b></p></td>
<td><p><input type=\"text\" size=\"35\" name=\"newoption[banaim]\" value=\"".htmlspecialchars($banaim)."\"></p></td>
</tr>
<tr><td colspan=2><p>AIM Ban Lists: You may ban certain AIM Handles from registering on your forums. To ban a specific AIM Handle, type the full handle. Put a space between each banned AIM Handle.<br></p></td></tr>
<tr>
<td><p><b>banyahoo</b></p></td>
<td><p><input type=\"text\" size=\"35\" name=\"newoption[banyahoo]\" value=\"".htmlspecialchars($banyahoo)."\"></p></td>
</tr>
<tr><td colspan=2><p>Yahoo Ban Lists: You may ban certain Yahoo Handles from registering on your forums. To ban a specific Yahoo Handle, type the full handle. Put a space between each banned Yahoo Handle.<br></p></td></tr>

####################################

####### NOW CREATE 3 NEW TEMPLATES (Control Panel --- Templates/Add)

------- Title them "error_banicq", "error_banaim", "error_banyahoo".

------- In the main body of each new template, add this:

Sorry. The administrator has banned you. To contact the administrator click <a href="mailto:$webmasteremail">here</a>

################################################## ################################
NOTE: You may also want to edit your "error_banemail" and "error_banip" templates
to display the same message as the new one above...why tell them HOW they've
been banned? Let them guess!!! :)

That's it, you're done!
You can now ban new registrations based on ICQ number, AIM Handle, and Yahoo Handle!

02-19-2001 12:25 PM

ICQ number, AIM, Yahoo can be easily registered under different number / username so I think it will be pretty hard to ban a user by them if (s)he decided to flood your board.

Good job. Waiting for number two. :D

02-19-2001 12:29 PM

Quote:

Originally posted by PeF
ICQ number, AIM, Yahoo can be easily registered under different number / username so I think it will be pretty hard to ban a user by them if (s)he decided to flood your board.

Good job. Waiting for number two. :D

I think it is another way to ban a user and the banned user would not have any idea as to how you banned them. So what I am trying to say is I think this hack has alot of potential IMHO.

02-19-2001 01:10 PM

I agree it might not be very useful, and can be easily gotten around. However, I also agree people might not think they are banned by ICQ number... +2 points for creativity.

Mac 09-07-2001 02:01 PM

Quote:

Originally posted by Dark_Wizard
the banned user would not have any idea as to how you banned them
I am totally agree with you.
It's so nice to see this piece of work.
Thank you so much

~Mac


All times are GMT. The time now is 04:40 AM.

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.01106 seconds
  • Memory Usage 1,737KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete