]> git.mxchange.org Git - ctracker.git/blobdiff - ctracker.php
MantisBT need these being white-listed.
[ctracker.git] / ctracker.php
index 62adbd1a9b8c6b259c6d2cbaad223723019744cf..b9f04d6a84dd3ea6a9ce433c064235c8c3b46a09 100644 (file)
@@ -33,7 +33,6 @@
 //* DEBUG: */ xdebug_start_trace();
 
 // Include files
-require('config/db_config.php');
 require('libs/lib_general.php');
 require('libs/lib_detector.php');
 require('libs/lib_connect.php');
@@ -42,6 +41,9 @@ require('libs/lib_updates.php');
 // Init
 initCrackerTrackerArrays();
 
+// Load configuration, if any is found
+crackerTrackerLoadConfiguration();
+
 // Get a database link
 aquireCrackerTrackerDatabaseLink();
 
@@ -53,22 +55,13 @@ crackerTrackerUpdateDatabaseScheme();
 if (isCrackerTrackerWormDetected()) {
        // Send the email, this must be the last line in this if() block because it contains a exit()
        sendCrackerTrackerMail();
-} // END - if
-
-// Suspicious POST data detected?
-if (isCrackerTrackerPostAttackDetected()) {
+} elseif (isCrackerTrackerPostAttackDetected()) {
        // Send the email, this must be the last line in this if() block because it contains a exit()
        sendCrackerTrackerPostMail();
-} // END - if
-
-// Does the current IP produce some blocked requests but not now?
-if ((getCrackerTrackerConfig('ctracker_alert_user') == 'Y') && (isCrackerTrackerIpSuspicious())) {
+} elseif ((getCrackerTrackerConfig('ctracker_alert_user') == 'Y') && (isCrackerTrackerIpSuspicious())) {
        // This IP is suspicious, so we alert him/her
        crackerTrackerAlertCurrentUser();
 } // END - if
 
 // Close any open database links
 crackerTrackerCloseDatabaseLink();
-
-// [EOF]
-?>