Giter Club home page Giter Club logo

micromsgrecovery's Introduction

SQLiteRet

Recover deleted data from SQLite databases

SQLiteRet is a Python3 script which goes through a SQLite database file and dumps all intact deleted rows it finds. Optionally, it attempts retrieval of partial (corrupted) rows and exports to file.

Usage:

sqliteret.py file [--corrupted] [--nostrict] [--output outputFile] [--tab | --raw] [--verbose] [--help]

  • --corrupted, -c

    Corrupted rows: selecting this option, the program will try to partially retrieve rows which contain corrupted data; the option is most useful to read through deleted string (corrupted rows make up to 80% of deleted rows), but please bear in mind that the reliability of these results is limited as these row can never be recovered with accuracy. Since primary keys are not available, they're outputted as 0. Due to corruption, each partial row might be read in different ways and a group of rows is outputted istead of a single row. In output, each group is separated by an additional new-line.

  • --nostrict, -ns

    Strict and non strict mode: normally, the program runs in strict mode, i.e. it assumes a common use of table types, which means int type tables actually store integers, char type tables actually store strings and so forth. However, SQLite allows for more flexible table types, e.g. an integer can be stored in a char type table. If you suspect a non regular use of table types, select the --nostrict option. Note: running this option raises the odds of false hits.

  • --output outputFile, -o outputFile

    Output files: select an output file. Recommended types are .tsv and .txt. If not specified, results will be printed to sdout. Note: use this option instead of output redirection, since the program may require user interaction.

  • --tab, -t | --raw,-r

    Output modes: tab mode outputs each row as a tab-separated list of values. It is recommended for .tsv files. raw mode outputs each row as a Python tuple. It is recommended for stdout and .txt files. Defaults to raw.

  • --verbose, -v

    Verbose mode: prints additional information during execution.

User interaction:

User interaction might be required if a database page is found to belong to more than one possible table. The program will ask to choose between the possible schemas presenting an example of a row decoded to each schema.

Usage example:

sqliteret.py cookies.sqlite -c -o results.tsv -t -v

Sample output: alt sample output

sqliteret.py cookies.sqlite -c -o results.txt

Sample output: alt sample output

Note:

SQLiteRet relies on the principle that deleted data can be found in the file's free (unallocated) space. Therefore, the chance of recovering data from databases which have been fully vacuumed and defragmented is minimal.

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.