]> git.mxchange.org Git - ctracker.git/blobdiff - libs/lib_detector.php
Continued:
[ctracker.git] / libs / lib_detector.php
index 862c7387435e263dadf7a7ffb42a79648ad28a46..819adc63885387154805d795e3fa744997a7cd0c 100644 (file)
@@ -438,13 +438,27 @@ function crackerTrackerLogAttack () {
        crackerTrackerInsertArray('ctracker_data', $rowData);
 }
 
+function ctrackerIncreaseAntiSpambotCount () {
+       // Init row data
+       $rowData = [
+               'remote_addr'    => determineCrackerTrackerRealRemoteAddress(),
+               'proxy_addr'     => getenv('REMOTE_ADDR'),
+       ];
+
+       // Update count
+       updateCrackerTrackerEntry($rowData, 'spam_bot_dectections');
+}
+
 // Alerts the current user about malicious/suspicious traffic
 function crackerTrackerAlertCurrentUser () {
        // Is there some data?
        if (isset($GLOBALS['ctracker_last_suspicious_entry'])) {
                // Does the user have a ticket?
                if (ifCtrackerTrackerAntiSpamFieldGiven()) {
-                       // Spam-bot filled out anti-spam field
+                       // Spam-bot filled out anti-spam field, register count
+                       ctrackerIncreaseAntiSpambotCount();
+
+                       // Output message to spammer
                        ctrackerTrackerLoadTemplate('bot_captured');
                } elseif (ifCrackerTrackerIpHasTicket()) {
                        // Load "Thank you" template