Package org.jwall.web.audit.io

Examples of org.jwall.web.audit.io.ModSecurity2AuditReader


                    //System.out.println("Content: " + contentLength + " bytes remaining..." );
                }
               
                System.out.println( "ScriptEvent:\n" + eventData );

                ModSecurity2AuditReader reader = new ModSecurity2AuditReader( new StringReader( eventData.toString() ) );
                AuditEvent evt = reader.readNext();

                if( evt != null ){
                    System.out.println( "Sending 200 OK");
                    out.print( "HTTP/1.1 200 OK" + HttpHeader.CRLF );
                } else {
View Full Code Here


  @Test
  public void test() {

    try {
      URL url = ScoreBugTest.class.getResource("/score-bug-audit.log");
      AuditEventReader reader = new ModSecurity2AuditReader(
          url.openStream());

      AuditEvent evt = reader.readNext();

      PersistentCollectionExtractor coll = new PersistentCollectionExtractor();
      Map<String, String> scores = coll.extractScores(evt);
      for (String key : scores.keySet()) {
        log.info("Score for '{}' = {}", key, scores.get(key));
View Full Code Here

    @Before
    public void setUp() throws Exception
    {
        URL url = ParserBugConsole8Test.class.getResource( "/rule-sev-extraction-bug.dat" );
        log.info( "Audit-ScriptEvent-Log: {}", url );
        reader = new ModSecurity2AuditReader( url.openStream() );
    }
View Full Code Here

    @Before
    public void setUp() throws Exception
    {
        URL url = RuleCountRuleIDsTest.class.getResource( "/rule-sev-extraction-bug.dat" );
        log.info( "Audit-ScriptEvent-Log: {}", url );
        reader = new ModSecurity2AuditReader( url.openStream() );
    }
View Full Code Here

    @Before
    public void setUp() throws Exception
    {
        URL url = ParserBugConsole8Test.class.getResource( "/rule-data-audit.log" );
        log.info( "Audit-ScriptEvent-Log: {}", url );
        reader = new ModSecurity2AuditReader( url.openStream() );
    }
View Full Code Here

    try {
      URL url = AuditEventDatabaseMock.class
          .getResource("/sink-audit.log.gz");
      log.info("Creating DatabaseMock from URL {}", url);
      InputStream in = new GZIPInputStream(url.openStream());
      AuditEventReader reader = new ModSecurity2AuditReader(in);
      AuditEvent e = reader.readNext();
      while (e != null) {
        events.add(e);
        variables.addAll(e.getVariables());
        e = reader.readNext();
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
    log.info("DatabaseMock has {} events", events.size());
View Full Code Here

    @Before
    public void setUp() throws Exception
    {
        URL url = ParserBugConsole8Test.class.getResource( "/unknown-severity-audit.log" );
        log.info( "Audit-ScriptEvent-Log: {}", url );
        reader = new ModSecurity2AuditReader( url.openStream() );
    }
View Full Code Here

    @Before
    public void setUp() throws Exception
    {
        URL url = ParserBugConsole8Test.class.getResource( "/CONSOLE-58-audit.log" );
        log.info( "Audit-ScriptEvent-Log: {}", url );
        reader = new ModSecurity2AuditReader( url.openStream() );
    }
View Full Code Here

    @Before
    public void setUp() throws Exception
    {
        URL url = ParserBugConsole8Test.class.getResource( "/TEST_SECTION-audit.log" );
        log.info( "Audit-ScriptEvent-Log: {}", url );
        reader = new ModSecurity2AuditReader( url.openStream() );
    }
View Full Code Here

 
  @Before
  public void setUp() throws Exception {
    URL url = ParserBugConsole8Test.class.getResource( "/CONSOLE-58-audit.log" );
        log.info( "Audit-ScriptEvent-Log: {}", url );
    AuditEventReader reader = new ModSecurity2AuditReader( url.openStream() );
    event = reader.readNext();
    Assert.assertNotNull( event );
  }
View Full Code Here

TOP

Related Classes of org.jwall.web.audit.io.ModSecurity2AuditReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.