X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ctracker.php;h=b9f04d6a84dd3ea6a9ce433c064235c8c3b46a09;hb=068b7a278cb22934896fdf1b42edefd7c2f990f0;hp=93e7de2bd5b03f83a3693c2b89ea7075d1a1c819;hpb=adb74f7670e281b460e0ec6ae8a70e8d28ecb433;p=ctracker.git diff --git a/ctracker.php b/ctracker.php index 93e7de2..b9f04d6 100644 --- a/ctracker.php +++ b/ctracker.php @@ -1,8 +1,9 @@ * @version 3.0.0 @@ -28,16 +29,21 @@ * along with this program. If not, see . */ +// XDEBUG call +//* DEBUG: */ xdebug_start_trace(); + // Include files -include('config/db_config.php'); -include('libs/lib_general.php'); -include('libs/lib_detector.php'); -include('libs/lib_connect.php'); -include('libs/lib_updates.php'); +require('libs/lib_general.php'); +require('libs/lib_detector.php'); +require('libs/lib_connect.php'); +require('libs/lib_updates.php'); // Init initCrackerTrackerArrays(); +// Load configuration, if any is found +crackerTrackerLoadConfiguration(); + // Get a database link aquireCrackerTrackerDatabaseLink(); @@ -49,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] -?>