You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 418 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
How to BAN IPS real fast!!!
Securityscandicdiscopub writes "Since they tried to hack me this morning and are trying ...
i made a banscript real fast ,if u need it just copy and paste the code below in your header.php
and make a txt file called banned.txt with an ip on each line.
so like
127.0.0.1
127.0.0.2
ok.
open header.php and all above just under the
paste this code:

if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
elseif (isset($_SERVER['HTTP_VIA'])) {
$ip = $_SERVER['HTTP_VIA'];
}
elseif (isset($_SERVER['REMOTE_ADDR'])) {
$ip = $_SERVER['REMOTE_ADDR'];
}
else {
$ip = "Banned";
}

$banned = file("banned.txt", "r+");
$nbanned = count($banned);
function ban($ip, $banned, $nbanned){
for ($i = 0 ; $i You Have been banned from this portal, if you feel this is in error
please send email to you@yoursite.com ";
die();
}
}
}
ban($ip, $banned, $nbanned);

i m using it myself too at the moment!hehe
"
Posted on Saturday, December 13 @ 14:29:19 CET by Zhen-Xjell
 
Related Links
· Computer Cops
· More about Security
· News by Zhen-Xjell


Most read story about Security:
PHP-Nuke admin.php security hole - PATCHED

Article Rating
Average Score: 5
Votes: 2


Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad


Options

 Printer Friendly Page  Printer Friendly Page

 Send to a Friend  Send to a Friend

Threshold
The comments are owned by the poster. We aren't responsible for their content.

No Comments Allowed for Anonymous, please register

Re: How to BAN IPS real fast!!! (Score: 1)
by XEULAS (MotherPlucker@KentuckyFriedChicken.com) on Saturday, December 13 @ 18:00:36 CET
(User Info | Send a Message) http://www.SiteLance.com
I love the simplicity! Can you think of an easy way to automatically import the nukecops banlist each night?

Or even something like

$banned = file("http://nukecops.com/banned.txt", "r+");




Re: How to BAN IPS real fast!!! (Score: 1)
by B-truE on Saturday, December 13 @ 20:04:36 CET
(User Info | Send a Message)
Isn't it easier to disallow them in the .htaccess file?

Just wondering...

Thanks.



Re: How to BAN IPS real fast!!! (Score: 1)
by XEULAS (MotherPlucker@KentuckyFriedChicken.com) on Saturday, December 13 @ 20:28:27 CET
(User Info | Send a Message) http://www.SiteLance.com
Hmmm. The code makes my site not work. Anyone else try it?



Re: How to BAN IPS real fast!!! (Score: 1)
by CodyG on Saturday, December 13 @ 21:03:12 CET
(User Info | Send a Message)
There are over 22,700 lines in the computercops ban list. If that file is called in myheader.php ... just how much longer will it take users to download any page on my nuke website?



Re: How to BAN IPS real fast!!! (Score: 1)
by tour93 on Saturday, December 13 @ 22:49:10 CET
(User Info | Send a Message) http://suncafe.us
Hi,
Weblord.it has a banip module to download.
Just so you know.


Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.131 Seconds - 176 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::