Skip to content

ahmadshah/lucy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LUCY

Inspired from the movie Lucy where at the end she turned into a USB stick which is quite ridiculous.

A PHP based parser for modsecurity log file. This library is used as parser for mlogc API request.

Usage

<?php

use Lucy\Parser;
use Lucy\Document;

$document = new Document('modsecurity.log', new Parser);
$document->read(); //Read the log file content and parse all blocks

var_dump($document->parser()->getContents()); //Return all parsed blocks

var_dump($document->parser()->getBlockContent('B')); //Return parsed content for block B only

TODO

  • Add parsers for remaining blocks
  • Add and improve unit test

About

PHP modsecurity log parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages