Skip to content

jsdt/fruitsalad

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fruitsalad

A script to redact MongoDB log files.

This script reads a MongoDB log file and outputs a redacted version of the log file, replacing IP addresses, namespaces and query/update data. Namespace details are replaced with generic adjectives, colours and fruit names (hence the name "fruitsalad"). IP addresses are mapped to a private range starting with 192.168.. The query values are hashed with a standard MD5 algorithm, so that the distribution of data remains unchanged, while the actual data will be lost. Note: The field names of the queries are currently left unchanged.

This is a very early beta version.

Usage

You need to have mtools installed and linked in your PYTHONPATH in order for fruitsalad to work. Then run:

python fruitsalad.py <logfile>

to output the scrambled version to stdout, or redirect the output to a file by adding > redacted.log to the end of the command.

DISCLAMER

This software is not supported by MongoDB, Inc. under any of their commercial support subscriptions or otherwise. Any usage of fruitsalad is at your own risk. Bug reports, feature requests and questions can be posted in the Issues section here on github.

About

A script to redact MongoDB log files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%