Example #1
0
 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();
     }
 }
Example #2
0
 public function call(Alert $alert)
 {
     return (bool) fwrite($this->getFileHandler(), $alert->getInfo() . PHP_EOL);
 }
Example #3
0
 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";
 }