GithubHelp home page GithubHelp logo

wangkesen / sanitizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cryptomator/sanitizer

0.0 2.0 0.0 144 KB

Utility to find and fix problems within vaults

Home Page: https://cryptomator.org/

License: GNU General Public License v3.0

Java 100.00%

sanitizer's Introduction

sanitizer

Utility to find and fix problems within vaults, restoring files and mapping cleartext to encrypted paths.

Download

Sanitizer is a Java program. The current version can be downloaded from the releases page.

You will need Java 8 installed to run it.

Usage

java -jar sanitizer-0.11.jar command ...

commands:
* check - check a vault for problems
* decryptFile - decrypt the contents of a single file
* encryptPath - encrypt a cleartext path
* decryptVault - decrypt a complete vault and restore inaccessible data

check command usage

java -jar sanitizer-0.11.jar check -vault vaultPath [-passphraseFile passphraseFile] [-deep] [-solve enabledSolution ...] [-output outputPrefix]

Detects problems in Cryptomator vaults.

    --deep                              Check file integrity (Could take a long
                                        time).
    --output <outputPrefix>             The prefix of the output files to write
                                        results to. Will create two output
                                        files:
                                        * <outputPrefix>.structure.txt and
                                        * <outputPrefix>.check.txt.
                                        Default: name of vault
    --passphrase <passphrase>           DO NOT USE. ONLY FOR TESTING PURPOSES.
                                        The cleartext vault passphrase. Omit
                                        this and you will be promted for the
                                        passphrase.
    --passphraseFile <passphraseFile>   A file to read the password from. Omit
                                        this and you will be promted for the
                                        passphrase.
    --solve <solve>                     Name of one or more problems to solve.
                                        Available: MissingEqualsSign,
                                        UppercasedFile, LowercasedFile,
                                        OrphanMFile, FileSizeOfZeroInHeader,
                                        FileSizeInHeader
    --vault <vaultPath>                 On which vault to work.

decryptFile command usage

java -jar sanitizer-0.11.jar decryptFile -vault vaultPath [-passphraseFile passphraseFile]

Decrypts single Cryptomator files.

    --passphrase <passphrase>           DO NOT USE. ONLY FOR TESTING PURPOSES.
                                        The cleartext vault passphrase. Omit
                                        this and you will be promted for the
                                        passphrase.
    --passphraseFile <passphraseFile>   A file to read the password from. Omit
                                        this and you will be promted for the
                                        passphrase.
    --vault <vaultPath>                 On which vault to work.

encryptPath command usage

java -jar sanitizer-0.11.jar encryptPath -vault vaultPath [-passphraseFile passphraseFile]

Encrypt cleartext paths for a Cryptomator vault.

    --passphrase <passphrase>           DO NOT USE. ONLY FOR TESTING PURPOSES.
                                        The cleartext vault passphrase. Omit
                                        this and you will be promted for the
                                        passphrase.
    --passphraseFile <passphraseFile>   A file to read the password from. Omit
                                        this and you will be promted for the
                                        passphrase.
    --vault <vaultPath>                 On which vault to work.

decryptVault command usage

java -jar sanitizer-0.11.jar decryptVault -vault vaultPath -target targetPath [-passphraseFile passphraseFile]

Decrypts all data from a vault and tries to restore inaccessible data.

    --passphrase <passphrase>           DO NOT USE. ONLY FOR TESTING PURPOSES.
                                        The cleartext vault passphrase. Omit
                                        this and you will be promted for the
                                        passphrase.
    --passphraseFile <passphraseFile>   A file to read the password from. Omit
                                        this and you will be promted for the
                                        passphrase.
    --target <targetPath>               Where to place the exported data.
    --vault <vaultPath>                 On which vault to work.

Requirements

You need to have Java 8 and JCE unlimited strength policy files installed to run this tool.

You can download these on

Install the JCE files following the description in the README.txt file inside the downloaded zip archive.

Examples

When you have everything set up, you can run the integrity check from the command line (cmd.exe on Windows) using:

java -jar sanitizer-x.y.jar check --vault <vaultPath>

You will be asked for the vault passphrase in this case. If that fails, you may store your passphrase in a file (without line break at the end!) and use:

java -jar sanitizer-x.y.jar check --vault <vaultPath> --passphraseFile <passphraseFile>

After completion, the tool will print how many problems were found and create two files:

  • <vaultName>.structure.txt: The full structure of the vault including all files and directories. Contains only encrypted names and the exact size of small and the approximate size of larger ones so we can not see your data. This may help us to diagnose issues not already handled by the sanitizer.
  • <vaultName>.check.txt: A list of known issues and some information. This includes the name of the encrypted root directory. This is useful to check how the root directory looks like when analyzing the structure file.

Building

Dependencies

  • Java 8 + JCE unlimited strength policy files (needed for 256-bit keys)
  • Maven 3

Run Maven

mvn clean install

License

Distributed under the GPLv3. See the LICENSE.txt file for more info.

sanitizer's People

Contributors

markuskreusch avatar overheadhunter avatar tobihagemann avatar

Watchers

 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.