*
* @author Roland Haeder <webmaster@ship-simu.org>
* @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
*
*/
// 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');
// Init
initCrackerTrackerArrays();
+// Load configuration, if any is found
+crackerTrackerLoadConfiguration();
+
// Get a database link
aquireCrackerTrackerDatabaseLink();
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]
-?>