Author |
Message |
Caedus
Hangin' Around

Joined: Jun 21, 2004
Posts: 39
Location: The Netherlands
|
Posted:
Tue Jul 06, 2004 9:17 am |
|
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 ? |
_________________
Caedus
|
|
|
 |
BobMarion
Former Admin in Good Standing

Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)
|
Posted:
Tue Jul 06, 2004 9:26 am |
|
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
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Caedus

|
Posted:
Tue Jul 06, 2004 10:04 am |
|
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

|
Posted:
Tue Jul 06, 2004 1:05 pm |
|
that might work. I'm not completely for sure the include tag will accept http:// in them. I'll have to do a little reading to make sure it would. |
|
|
|
 |
BobMarion

|
Posted:
Tue Jul 06, 2004 1:10 pm |
|
Okay, let's say your main dommain is www.weareus.com 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

|
Posted:
Tue Jul 06, 2004 1:17 pm |
|
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 http:// linkage. |
|
|
|
 |
Caedus

|
Posted:
Thu Jul 08, 2004 12:26 pm |
|
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 ! 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 ! |
|
|
|
 |
Caedus

|
Posted:
Thu Jul 08, 2004 12:36 pm |
|
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. |
|
|
|
 |
|