vBulletin Modifications

Miscellaneous Hacks - Htaccess IP Restriction

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > Forum Archives > vBulletin 3.0 Hack Releases

Reply
 
Thread Tools Search this Thread
Download Options
You Must Register First
To Download This Modification

Bugs
No bugs found in the system. If you have found a bug, please report a bug here
Submit A Bug | View All Bugs

Advertisement
  
Supported
[vB 3.0.8] Miscellaneous Hacks - Htaccess IP Restriction (119)
Released: 09-03-2005, 08:34 AM
Modification Information:
Author: Fury
Last Online: 10-11-2006
Hack Version: Final Installer Included: 1 Additional queries added to database: 1
New Templates: 0 Template Edits: 0 File Edits: 1
New Files: 0 New Phrases: 0 Installation Time (In Minutes): 5

Before i coded this version, i tried plenty of existed htaccess hacks, tested them, and few of my tests leaded to bad results, meaning - failed. i managed to pass it without any difficult problem so i decided to code one myself, and it passed every test i did

Decided to release this one to help you increase your board security, very important part of the board.

Enjoy it, easy to install, any problems just reply here, ill do my best to help you out.

Greets, Fury

P.S it fits to every 3.0.x versions.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Add a Comment!
Old 09-07-2005, 10:17 AM   #21
Advanced Coder
Niels's Avatar
Join Date: Jun 2004
Real Name: Niels
Location: NL
Niels is on a distinguished road

Default

Quote:
Originally Posted by biocore
thx for the effort but this still doesn't solve my problem.

there is no $globaltemplates = array(require_once('./includes/init.php'); in global.php

either he ment something like:
require_once('./includes/init.php');

or:
$globaltemplates = array_merge(

:s
Aaahhh now I know the problem
just add it under:
You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 09-07-2005, 10:35 AM   #22
Member
Join Date: Jun 2005
biocore is on a distinguished road

Default

lol could you repost your last post, seems like i can't see it (an error in this board i guess).





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-2005, 10:57 AM   #23
Advanced Coder
Niels's Avatar
Join Date: Jun 2004
Real Name: Niels
Location: NL
Niels is on a distinguished road

Default

Quote:
Originally Posted by biocore
lol could you repost your last post, seems like i can't see it (an error in this board i guess).

I can't see it also :s




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-2005, 10:59 AM   #24
Member
Join Date: Jun 2005
biocore is on a distinguished road

Default

Guess it's a problem in vb here, heard it somewhere before, anyway i'm still stuck can you help or not Niels ?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-2005, 11:30 AM   #25
Advanced Coder
Niels's Avatar
Join Date: Jun 2004
Real Name: Niels
Location: NL
Niels is on a distinguished road

Default

Quote:
Originally Posted by biocore
Guess it's a problem in vb here, heard it somewhere before, anyway i'm still stuck can you help or not Niels ?
Yes sorry went to the barber
well I'm using my own htaccess/ip restriction and by this hack just insert it under:
You must first be a registered member to view any code.
I should work fine then




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-2005, 11:51 AM   #26
Member
Join Date: Jun 2005
biocore is on a distinguished road

Default

pfff me is getting tired :s

If i insert this:
[php]$globaltemplates = array(
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="Private Area (u\p)"');
header("HTTP/1.0 401 Unauthorized");
echo "Unauthorized login attempts are logged.n";
exit;
} else {
//checking database
$userinf=$DB_site->query_first("SELECT user.password,user.userid,user.salt FROM user WHERE username='$_SERVER[PHP_AUTH_USER]'");
if($userinf['userid']){
$valid="false";
$validip=$DB_site->query_first("SELECT ipmasks FROM user WHERE userid='$userinf[userid]'");
$ipremote = trim($_SERVER["REMOTE_ADDR"]);
$ipmask = explode(" ",$validip['ipmasks']);

foreach ($ipmask as $value)
{
$value = str_replace(".*", "", $value);
if (strstr($ipremote, $value))
{
$valid = "true";
break;
}
}

if ($valid != "true")
{
Header("HTTP/1.1 404 Not Found");
print " Header("HTTP/1.1 404 Not Found");
print "<HTML>
<HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD>
<BODY>
<H1>Not Found</H1>
The requested document was not found on this server.
<P>
<HR>
<ADDRESS>
Web Server at your.domain.here</ADDRESS>
</BODY>
</HTML>";
exit;

}
}
}

}[php]
I get this: Parse error: parse error, expecting `')'' in c:\****\***.coml\wwwroot\****\global.php on line 20

If i insert this:
You must first be a registered member to view any code.
Iget this: Parse error: parse error in c:\****\***.coml\wwwroot\****\global.php on line 46




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-07-2005, 11:53 AM   #27
Member
Join Date: Jun 2005
biocore is on a distinguished road

Default

ok figured out some more now:

i think its supposed to be this in the install file:

Find:
You must first be a registered member to view any code.
ADD BELOW:
You must first be a registered member to view any code.
still doesn't work tho :s

edit: the weird part now is that i get the htaccess screen but my username and pass doesn't work, i have to use my old htaccess login & password from which i deleted the files a min ago :s real weird to me

Last edited by biocore; 09-07-2005 at 02:20 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-09-2005, 08:23 AM   #28
Coder
Join Date: Aug 2004
Fury is on a distinguished road

Default

re-download the install, it will work very well now.

sorry for the typo




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-27-2005, 11:47 AM   #29
Coder
A-FXP-D3LTA's Avatar
Join Date: Jan 2005
Location: Amsterdam, NLD
A-FXP-D3LTA is on a distinguished road

Default

I did the install, the php. Worked ok, no errors, nothing.
After the install, I get this error on the index.php

Parse error: parse error, expecting `')'' in c:\apache\www\board\board\global.php on line 21

Line 21 is:
if (!isset($_SERVER['PHP_AUTH_USER']))

Another thing... I can't find the IP mask field in the usercp/admincp... Can be my fault, been coding for a few hours now




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-28-2005, 08:37 AM   #30
Advanced Coder
Niels's Avatar
Join Date: Jun 2004
Real Name: Niels
Location: NL
Niels is on a distinguished road

Default

Quote:
Originally Posted by A-FXP-D3LTA
I did the install, the php. Worked ok, no errors, nothing.
After the install, I get this error on the index.php

Parse error: parse error, expecting `')'' in c:\apache\www\board\board\global.php on line 21

Line 21 is:
if (!isset($_SERVER['PHP_AUTH_USER']))

Another thing... I can't find the IP mask field in the usercp/admincp... Can be my fault, been coding for a few hours now
About line 21, please post line 20 also it could have a connection with that line I guess And about the ipmask field did you edit the file /admincp/user.php ?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning Serious Flaws in Htaccess / Ip restriction Hack(s)! Niels General vBulletin Support 2 09-08-2005 04:26 PM
htaccess biocore General vBulletin Support 2 08-13-2005 05:13 PM


All times are GMT -3. The time now is 06:59 AM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)