// If it differs to original and the *whole* request string is not in whitelist
// then block the attempt
-if (isCrackerTrackerWormDetected()) {
+if (!crackerTrackerIsConsole() && isCrackerTrackerWormDetected()) {
// Send the email, this must be the last line in this if() block because it contains a exit()
sendCrackerTrackerMail();
-} elseif (isCrackerTrackerPostAttackDetected()) {
+} elseif (!crackerTrackerIsConsole() && isCrackerTrackerPostAttackDetected()) {
// Send the email, this must be the last line in this if() block because it contains a exit()
sendCrackerTrackerPostMail();
-} elseif ((getCrackerTrackerConfig('ctracker_alert_user') == 'Y') && (isCrackerTrackerIpSuspicious())) {
+} elseif (!crackerTrackerIsConsole() && getCrackerTrackerConfig('ctracker_alert_user') == 'Y' && isCrackerTrackerIpSuspicious()) {
// This IP is suspicious, so we alert him/her
crackerTrackerAlertCurrentUser();
} // END - if
function crackerTrackerSanitize ($str) {
return str_replace(array('//', '/./'), array('/', '/'), $str);
}
+
+function crackerTrackerIsConsole () {
+ return (php_sapi_name() == 'cli');
+}