X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ctracker.php;h=132cd520efde53b9fcc4a276607c74c2f3f4866d;hb=a93f594296675ab7a89983afd24af2dd04366912;hp=f3770e1b2055768b73302d88e6c52565591f1a30;hpb=1c0b801f6514cf9675efead98fcb41a052ffb0b8;p=ctracker.git diff --git a/ctracker.php b/ctracker.php index f3770e1..132cd52 100644 --- a/ctracker.php +++ b/ctracker.php @@ -7,7 +7,7 @@ * * @author Roland Haeder * @version 3.0.0 - * @copyright Copyright (c) 2009 - 2011 Cracker Tracker Team + * @copyright Copyright (c) 2009 - 2017 Cracker Tracker Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -30,10 +30,9 @@ */ // XDEBUG call -/* DEBUG: */ xdebug_start_trace(); +//* 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] -?>