]> git.mxchange.org Git - ctracker.git/commitdiff
Also log request method
authorRoland Häder <roland@mxchange.org>
Mon, 25 Jul 2016 07:59:45 +0000 (09:59 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 25 Jul 2016 07:59:45 +0000 (09:59 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
libs/lib_detector.php
libs/lib_updates.php

index c70c43ae41ade62fcdb686830a85789821b0dd56..52b42dbe49a21288a4d73b0e4706e39973222138 100644 (file)
@@ -331,18 +331,19 @@ function crackerTrackerLogAttack () {
 
        // Prepare array for database insert
        $rowData = array(
-               'remote_addr'   => determineCrackerTrackerRealRemoteAddress(),
-               'proxy_addr'    => getenv('REMOTE_ADDR'),
-               'user_agent'    => crackerTrackerUserAgent(),
-               'get_data'      => crackerTrackerQueryString(),
-               'post_data'     => $GLOBALS['ctracker_post_track'],
-               'check_worm'    => $GLOBALS['ctracker_checkworm'],
-               'check_post'    => $GLOBALS['ctracker_check_post'],
-               'server_name'   => crackerTrackerServerName(),
-               'script_name'   => crackerTrackerScriptName(),
-               'referer'       => crackerTrackerReferer(),
-               'proxy_used'    => $proxyUsed,
-               'first_attempt' => 'NOW()'
+               'remote_addr'    => determineCrackerTrackerRealRemoteAddress(),
+               'proxy_addr'     => getenv('REMOTE_ADDR'),
+               'user_agent'     => crackerTrackerUserAgent(),
+               'get_data'       => crackerTrackerQueryString(),
+               'post_data'      => $GLOBALS['ctracker_post_track'],
+               'check_worm'     => $GLOBALS['ctracker_checkworm'],
+               'check_post'     => $GLOBALS['ctracker_check_post'],
+               'server_name'    => crackerTrackerServerName(),
+               'script_name'    => crackerTrackerScriptName(),
+               'referer'        => crackerTrackerReferer(),
+               'request_method' => $_SERVER['REQUEST_METHOD'],
+               'proxy_used'     => $proxyUsed,
+               'first_attempt'  => 'NOW()'
        );
 
        // Insert the array in database
index 3c53dfbbc7675b05131f7084508143f5baa1baa9..082b262e3a3d5a4e02c92100b071eb173d932c5e 100644 (file)
@@ -72,6 +72,11 @@ FOREIGN KEY ( `ctracker_data_id` ) REFERENCES `' . $GLOBALS['ctracker_dbname'] .
                4 => array(
                        'ALTER TABLE `ctracker_data` ADD INDEX `remote_proxy_last` ( `remote_addr`, `proxy_addr`, `last_attempt` DESC )',
                ),
+
+               // HTTP request method
+               5 => array(
+                       "ALTER TABLE `ctracker_data` ADD `request_method` VARCHAR( 255 ) NULL DEFAULT NULL COMMENT 'HTTP request method' AFTER `referer`, ADD INDEX ( `request_method` )",
+               ),
        );
 }