PDA

View Full Version : Ban Ip list hack


kingtech
01-07-2004, 10:10 PM
I created a mod to add an IP to the banip value in the settings table .. if i add info to the value hack directly into the DB or with my hack it does not show IP as banned when you access the forum. But if i go into the admin > setting options and pull up the banned options .. I can see the data I entered .. save changes without changing the value and it works to ban the IP.. am I missing something ??

THanks !!!

Gary King
01-07-2004, 11:02 PM
I don't quite understand what you mean, but if this is vB 2, then you have to Submit options once before any new options take effect.

kingtech
01-07-2004, 11:38 PM
Lets say you went in using mysql and maually added values to the list of ips in the option named banip. They do not work to ban the ips. But if you open up the admin page an go to Banning Options.. you see the ips in the field even though they are not working. Without changing anything you click Save Changes at the bottom of the options page .. and they start working..

Make sense ??

But, sounds like you are onto somethong .. it is VB2 .. what does "Submit Options once" mean ???

Thanks for your help !!

Gary King
01-07-2004, 11:42 PM
I mean that you have to submit your vBulletin Options once (in admin cp) before any new settings take effect.

kingtech
01-07-2004, 11:43 PM
But thats what I am trying to figure out how to work around ?? Why is that .. what happens there that makes the differenc ??

Gary King
01-07-2004, 11:51 PM
Well it's always really been like that, and hackers have come to accept things like that in vBulletin 2, but not in vBulletin 3 ;)

kingtech
01-08-2004, 12:03 AM
If i upgrade to 3 wont I lose all my hacks ??

kingtech
01-09-2004, 02:30 AM
Finally figured it out .. all of the options are saved in the table template with the title options

SELECT * FROM `template` WHERE `template` = 'options'

I made the following function to insert my banned IPs . but could also be used to manually insert other options:

function Build_Options ($baniplist) {
global $DB_site;
$options = $DB_site->query_first("SELECT template FROM template where title = 'options'");
$opt = explode ('$banip = "";', $options['template']);
$newopts = $opt[0].'$banip = "'.$baniplist.'";'.$opt[1];
$options = $DB_site->query("UPDATE template SET template = '$newopts' where title = 'options'");
return;
}




Thanks for your help

Gary King
01-09-2004, 06:35 PM
If i upgrade to 3 wont I lose all my hacks ??
Yes, if the hacks haven't yet been ported over to vB 3.