Package org.jwall.web.audit.io

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


    List<AuditEvent> list = new ArrayList<AuditEvent>();
   
    try {
      int i = 0;
      URL url = EventList.class.getResource( "/events.audit-log" );
      ModSecurity2AuditReader reader = new ModSecurity2AuditReader( url.openStream() );
      AuditEvent event = reader.readNext();
      while( event != null && i < num ){
        list.add( event );
        event = reader.readNext();
      }

     
    } catch (Exception e) {
     
View Full Code Here


        AuditEventReader src = null;

        if( "stdin".equals( p.getProperty( COLLECTOR_SERIAL_LOG ) ) ){
            System.out.println( "Reading from standard input..." );
            src = new ModSecurity2AuditReader( System.in, true );
            return src;
        }

        if( p.getProperty( COLLECTOR_SERIAL_LOG ) != null ){

            String input = p.getProperty( COLLECTOR_SERIAL_LOG );
            if( "stdin".equalsIgnoreCase( input ) ){
                System.out.println("Reading ModSecurity 2.x serial audit-log from standard input..." );
                src = new ModSecurity2AuditReader( System.in );
                return src;
            }

            File f = new File( p.getProperty( COLLECTOR_SERIAL_LOG ) );
            if( ! f.canRead() )
                throw new Exception("Cannot open "+f.getAbsoluteFile()+" for reading!");



            src = new ModSecurity2AuditReader( f, tail );
            return src;
        }

        if( p.getProperty( COLLECTOR_CONCURRENT_LOG ) != null && p.getProperty(COLLECTOR_CONCURRENT_INDEX) != null){
View Full Code Here

            if( format == AuditFormat.MOD_SECURITY_1_X_SERIAL_LOG )
                r = new ModSecurityAuditReader( auditFile, skip > 0 );

            if( format ==AuditFormat.MOD_SECURITY_2_X_SERIAL_LOG )
                r = new ModSecurity2AuditReader( auditFile, skip > 0 );

            if( format == AuditFormat.MOD_SECURITY_2_X_CONCURRENT_LOG ){
                File dataDir = new File( auditFile.getParent() );
                r = new ConcurrentAuditReader( auditFile, dataDir );
            }
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.