LevelDBDumper

module
v2.0.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2021 License: GPL-3.0

README

LevelDB Dumper

Repo Size

Enumerates all Key values in a LevelDB database and outputs their corresponding Value
Report a Bug · Request Feature

Table of Contents

About The Project

This project was created out of a lack of a cross-platform tool which was able to enumerate every key in a LevelDB database and output its value. Other Level DB dumpers either were limited to one OS or had a complex installation process, so there was a need for a dumper which can be downloaded and run without dependency or installation issues.

I'm by no means an expert at using Go, so the code might not be as efficient or clean as it could be. If you want to help improve code quality, please consider contributing.

A massive thanks to Harsh Vardhan Singh and his repo which did much of the LevelDB enumeration work for me.

TODO

  • Recursively parse from directory instead of providing one LevelDB database
  • Improved help dialog with list of arguments and examples
  • Export to CSV file for each discovered LevelDB database
  • Quiet mode to avoid dumping all Key/Values
  • Truncate long Values in non-quiet output
  • Display coloured Key/Value for non-quiet mode
  • Ignore processing empty LevelDB databases to avoid creating empty output files
  • Travis CI builds for Windows and Linux
  • Check if user has Administrator/root privileges
  • Allow customisation of CSV output name
  • Batch CSV file (All LevelDB dumps into one file)
  • JSON export
  • Text export

Usage

LevelDB Dumper 2.0.2

Author: Matt Dawson

        d               Directory to recursively process. This is required.
        q               Don't output all key/value pairs to console. Default will output all key/value pairs.
        csv             Directory to save CSV formatted results to. Be sure to include the full path in double quotes

Examples: LevelDBParser.exe -d "C:\Temp\leveldb"
          LevelDBParser.exe -d "C:\Temp\leveldb" --csv "C:\Temp" -q

          Short options (single letter) are prefixed with a single dash. Long commands are prefixed with two dashes

LevelDB Dumper will search recursively from the directory passed to it for LevelDB databases. Upon finding one, it will be queued for dumping. Once it has searched the entire drive, the databases will be enumerated from the saved list and dumped to the console.

It is recommended to specify an output file for dumping. Using --csv <Directory> will output a CSV file per LevelDB database found, containing the timestamp of dumping and path to the LevelDB database.

It is worth noting that all Unicode control characters/non-graphics characters are stripped from the output strings but are retained for output files, such as CSV. For applications such as Discord, where null terminators are found in Key names, this is used to improve output formatting.

There have been issues with Windows 10 where the program is opened in a new window instead of the current Command Line window instance, meaning that the output is not visible. A work-around for this appears to be running the Command Prompt/Powershell as Administrator. However, for analysis of output, the key/value pairs should be output to a file rather than redirecting or analysing through the command line window.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

LevelDB is written in Go, so it can be run cross-platform. If you are building from source, you will need to install Golang

Installation

From Releases
  1. Download the latest release for your platform of choice.

  2. That's it!

From Repo
  1. Clone the repo
git clone https://github.com/mdawsonuk/LevelDBDumper.git
  1. Using Go CLI, get the GoLevelDB package
go get github.com/syndtr/goleveldb/leveldb
  1. Using Go CLI, build the application
cd src/LevelDBDumper
go build
  1. That's it! An executable should be created in that directory. View the article here for information on cross-platform compilation.

Contributing

Want to make the tool better? Improve the code? Pull requests are accepted and very much appreciated.

License

Distributed under the GPLv3 License. See LICENSE for more information.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL