Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)
Author Message
Caedus
Hangin' Around



Joined: Jun 21, 2004
Posts: 39
Location: The Netherlands

PostPosted: Tue Jul 06, 2004 9:17 am Reply with quote

Well, I think that it is possible in theory.

Let's say I've my main site on http;//www.mydomain.com including sentinel. Now if I've a second domain on http;//second.mydomain.com would it be sufficient to just upload the abuse dir and add this line to mainfile.php?
Code:
include("http://www.mydomain.com/includes/sentinel.php");

That way it would detect the ipadresses from one main database, and that's what I would like. Because a hacker on one site, will be banned on all other (sub)domains as well.

Or am I simplifying things to much Confused?

_________________
Arrow Caedus
RavensScripts 
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
BobMarion
Former Admin in Good Standing



Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)

PostPosted: Tue Jul 06, 2004 9:26 am Reply with quote

It should work but there is a minor issue. Sentinel pulls data from the sites nuke_config table and if you use two seperate db's for the two seperate sites then it may very well crash your site.

_________________
Bob Marion
Codito Ergo Sum
http://www.nukescripts.net 
View user's profile Send private message Send e-mail Visit poster's website
Caedus







PostPosted: Tue Jul 06, 2004 10:04 am Reply with quote

And if I change the paths in this piece of code in the includes/sentinel.php file? Ie. writing http;//www.mydomein.com/config.php in stead of ../../config.php
Code:
// Load required scripts

if ($forum_admin == 1) {
    require_once("../../../config.php");
    require_once("../../../db/db.php");
    $lang_dir = "../../../";
} elseif ($inside_mod == 1) {
    require_once("../../config.php");
    require_once("../../db/db.php");
    $lang_dir = "../../";
} else {
    require_once("config.php");
    require_once("db/db.php");
    $lang_dir = "";
}
 
BobMarion







PostPosted: Tue Jul 06, 2004 1:05 pm Reply with quote

that might work. I'm not completely for sure the include tag will accept [ Only registered users can see links on this board! Get registered or login! ] in them. I'll have to do a little reading to make sure it would.
 
BobMarion







PostPosted: Tue Jul 06, 2004 1:10 pm Reply with quote

Okay, let's say your main dommain is [ Only registered users can see links on this board! Get registered or login! ] and your sub is true.weareus.com . Then we find the paths to both and let's say your main path is /home/weareus/public_html and the path to your subdomain is /home/weareus/public_html/true . Then you should be able to use:
Code:
// Load required scripts

if ($forum_admin == 1) {
    require_once("/home/weareus/public_html/config.php");
    require_once("/home/weareus/public_html/db/db.php");
    $lang_dir = "/home/weareus/public_html/";
} elseif ($inside_mod == 1) {
    require_once("/home/weareus/public_html/config.php");
    require_once("/home/weareus/public_html/db/db.php");
    $lang_dir = "/home/weareus/public_html/";
} else {
    require_once("/home/weareus/public_html/config.php");
    require_once("/home/weareus/public_html/db/db.php");
    $lang_dir = "/home/weareus/public_html/";
}


Mind you that I can't promise this will work as I have not tested it at all.
 
BobMarion







PostPosted: Tue Jul 06, 2004 1:17 pm Reply with quote

You would also need to use:
Code:
include("/home/weareus/public_html/includes/sentinel.php");
as the include line in your mainfile.php . Both this post and the one above assumes your host does not have "URL fopen wrappers" enabled.

If the host has "URL fopen wrappers" enabled then you should be able to use the [ Only registered users can see links on this board! Get registered or login! ] linkage.
 
Caedus







PostPosted: Thu Jul 08, 2004 12:26 pm Reply with quote

It worked (though I had to think hard about what my main path was)! HTTP links didn't work, but now with the path it all does.

There is one thing that needs to be changed also, in order to get it fully functional:

Quote:
IN SENTINEL.PHP

Change all ".$prefix." instances to the prefix that has the sentinel database


Now I tried to hack at my testdomain and I got blocked! Not only that, when I tried to enter my maindomain, I was still blocked Cool ! So when a stupid hacker tries something on one (sub)domain they are gone (and that is good because I'm planning on having about 12 nukesites on 12 subdomains).

Thx for the tips! Now I only need to change .htaccess and the database to delete my ip Laughing !
 
Caedus







PostPosted: Thu Jul 08, 2004 12:36 pm Reply with quote

And now I've noticed one more small thing: it didn't wrote my ip to the .htaccess file, but only to the database.

I tried to find a path where I can change this, but I haven't found the right one.

Ah well, it doesn't matter much, cause it can only write to 1 .htaccess file at a time, and for my übersitesystem a database is much more functional.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©