Git Product home page Git Product logo

bro-log-analysis's Introduction

Bro-Log-Data-Analytics

Bro log data analytics for shits and gigs. input some log files and output some analysis.

what is this?

so there's four files:

- cc.csv (you're gonna need this for conn-analysis)
- conn-analysis.py (analysis on connection log analysis)
- excel-script.py (gzip files -> excel spreadsheet)
- http-analysis.py (guess what this does)
you're gonna need all of these + any gzip logs you have laying around

how to use

1. python excel-script.py
2. python conn-analysis.py OR python http-analysis.py
drop down menus should show up and you just need to follow the instructions

but i have different needs/wants/log types!

have no fear, it's pretty customizable.

just change the excel-script to fit what file name you have and change the delimiter + any special rules you may have for your files.

http_filename = 'your_file_name.your_file_type' #line 9
for i in range(0,num_data_points):  #line 11
lines = file_content.split('your_delimiter') #line 18

i want more analysis!

just look at the existing examples for ideas on how to start. like this one: figure out what headers you need, perform your analysis, and print out the data you collected. ezpz.

# * * * * * * * * * * * * *

    # (5) Failed connection attempts per source address
    # headers needed: hosts(9) info_code (17)
    if x == 5:
        hosts = []
        attempts = []
        for rownum in range(log.nrows):
            if rownum > 1:
                code = log.cell(rownum,15).value #value of error code
                host = log.cell(rownum,9).value #value of host
                if host not in hosts and (code.startswith("4") or code.startswith("5")):
                    #if the code indicates failed connection
                    hosts.append(host)
                    ind = hosts.index(host)
                    attempts.append(1)
                elif host in hosts and (code.startswith("4") or code.startswith("5")):
                    ind = hosts.index(host)
                    attempts[ind] += 1
        print "HOSTS" + ', ' + "ATTEMPTS"
        for i in range(len(hosts)):
            print hosts[i] + ', ',attempts[i]

    # * * * * * * * * * * * * *

why?

why not

bro-log-analysis's People

Contributors

theresaming avatar

Stargazers

Daste avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.