From ac1fb1651d466302a79579c80de60259957fabb7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 26 Jul 2016 09:35:00 +0200 Subject: [PATCH] Can be combined and makes code look nicer. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- ctracker.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ctracker.php b/ctracker.php index 62adbd1..1cf268a 100644 --- a/ctracker.php +++ b/ctracker.php @@ -53,16 +53,10 @@ 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 -- 2.39.5