Giter Site home page Giter Site logo

jaegeral / redlinetimelinedb_extractor Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 11 KB

Extracts the Timeline of a Redline parsed sqlite database so it can be used e.g. in an ELK stack.

License: Apache License 2.0

Python 100.00%
cyber redline fireeye mandiant csv elk timeline sqlite tool

redlinetimelinedb_extractor's People

Contributors

deralexxx avatar jaegeral avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

redlinetimelinedb_extractor's Issues

Exception Thrown When Writing Unicode To CSV

Problem:

It appears that some .mans files generated by HX (from default Comprehensive Investigative Details acquisition script) contain unicode strings - I haven't managed to pinpoint which EventType(s) this applies to.

.mans file was +4.5GB in size, console output below:

2019-08-14 16:29:41,912 - rltldb_application - INFO - Redline Timeline DB <-> CSV Converter
2019-08-14 16:29:41,914 - rltldb_application - INFO - Converting file at .\REDACTED_Comprehensive Investigative Details_2019-08-10T06_04_57Z.mans
2019-08-14 16:31:08,470 - rltldb_application - INFO - Number of rows: 5975022
2019-08-14 16:31:08,472 - rltldb_application - INFO - Processing 1-10001 / 5975022
2019-08-14 16:31:08,774 - rltldb_application - INFO - Processing 10001-20001 / 5975022
2019-08-14 16:31:09,044 - rltldb_application - INFO - Processing 20001-30001 / 5975022
2019-08-14 16:31:09,322 - rltldb_application - INFO - Processing 30001-40001 / 5975022
2019-08-14 16:31:09,697 - rltldb_application - INFO - Processing 40001-50001 / 5975022
2019-08-14 16:31:10,084 - rltldb_application - INFO - Processing 50001-60001 / 5975022
2019-08-14 16:31:10,475 - rltldb_application - INFO - Processing 60001-70001 / 5975022
2019-08-14 16:31:10,778 - rltldb_application - INFO - Processing 70001-80001 / 5975022
<p>Error: <class 'UnicodeEncodeError'></p>

Solution:

Specify utf-8 encoding when opening .csv file.

Current
47: with open(csvfilename, 'w', newline='') as csvfile:
Solution
47: with open(csvfilename, 'w', newline='', encoding='utf-8') as csvfile:

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.