From: Michael Vogel Date: Sat, 28 Mar 2015 07:49:24 +0000 (+0100) Subject: Some more logging added for the DDoS prevention X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=51cd55c8ad59c8385245a70425f455c0880bbfe9;p=friendica.git Some more logging added for the DDoS prevention --- diff --git a/boot.php b/boot.php index 3d4744d9b1..9db210840f 100644 --- a/boot.php +++ b/boot.php @@ -2184,13 +2184,13 @@ function zrl_init(&$a) { // Is it a DDoS attempt? // The check fetches the cached value from gprobe to reduce the load for this system - $urlparts = parse_url($url); + $urlparts = parse_url($tmp_str); $result = Cache::get("gprobe:".$urlparts["host"]); if (!is_null($result)) { $result = unserialize($result); if ($result["network"] == NETWORK_FEED) { - logger("DDoS attempt detected for ".$urlparts["host"], LOGGER_DEBUG); + logger("DDoS attempt detected for ".$urlparts["host"]." by ".$_SERVER["REMOTE_ADDR"].". server data: ".print_r($_SERVER, true), LOGGER_DEBUG); return; } } diff --git a/include/gprobe.php b/include/gprobe.php index 3f3164f763..03cdbd072b 100644 --- a/include/gprobe.php +++ b/include/gprobe.php @@ -48,7 +48,7 @@ function gprobe_run(&$argv, &$argc){ if (!is_null($result)) { $result = unserialize($result); if ($result["network"] == NETWORK_FEED) { - logger("DDoS attempt detected for ".$urlparts["host"], LOGGER_DEBUG); + logger("DDoS attempt detected for ".$urlparts["host"]." by ".$_SERVER["REMOTE_ADDR"].". server data: ".print_r($_SERVER, true), LOGGER_DEBUG); return; } }