* @version 3.0.0 * @copyright Copyright (c) 2009 - 2017 Cracker Tracker Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * * This program is based on Cracker Tracker Protection System - Stand-Alone * which has been written by Christian Knerr and is heavily enhanced in * detectection, logging and reporting of suspicious traffic. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ // XDEBUG call //* DEBUG: */ xdebug_start_trace(); // Include files 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(); // Update database scheme crackerTrackerUpdateDatabaseScheme(); // If it differs to original and the *whole* request string is not in whitelist // then block the attempt if (!crackerTrackerIsConsole() && isCrackerTrackerWormDetected()) { // Send the email, this must be the last line in this if() block because it contains a exit() sendCrackerTrackerMail(); } elseif (!crackerTrackerIsConsole() && isCrackerTrackerPostAttackDetected()) { // Send the email, this must be the last line in this if() block because it contains a exit() sendCrackerTrackerPostMail(); } elseif (!crackerTrackerIsConsole() && getCrackerTrackerConfig('ctracker_alert_user') == 'Y' && isCrackerTrackerIpSuspicious()) { // This IP is suspicious, so we alert him/her crackerTrackerAlertCurrentUser(); } // Close any open database links crackerTrackerCloseDatabaseLink();