public function call(Alert $alert) { $config = $this->getConfig(); if ($alert->isWorstThan($config['min_gravity'])) { $ip = $this->listener->waf->getIp(); $this->listener->wafStorage->add($ip); // retrigger listener $this->listener->waf->listen(); } }
public function call(Alert $alert) { return (bool) fwrite($this->getFileHandler(), $alert->getInfo() . PHP_EOL); }
protected function generateMailBody(Alert $alert) { $requestExport = print_r($_REQUEST, true); $serverExport = print_r($_SERVER, true); return "\n{$alert->getHtmlInfo()}\n<hr/>\n\$_REQUEST: <br/>\n<pre>\n{$requestExport}\n</pre>\n<hr/>\n\$_SERVER: <br/>\n<pre>\n{$serverExport}\n</pre>\n\t\t"; }