cryptomator / sanitizer

Utility to find and fix problems within vaults
https://cryptomator.org/
GNU General Public License v3.0
33 stars 9 forks source link

Problems with encryptPath on Windows 10 #5

Open TimetravelerDD opened 5 years ago

TimetravelerDD commented 5 years ago

I am using the script in powershell on windows 10 and it seems to work fine, it returns a valid path, however the returned path is definitely not the correct one (my vault is in google filestream)

Maybe the format is wrong? backslash instead of forward slash etc?

Example:

PS C:\Users\marku> java.exe -jar "G:\Meine Ablage\Encrypted Storage\sanitizer-0.15.jar" encryptPath -vault "G:\Meine Ablage\Encrypted Storage\Container"
# Cryptomator vault sanitizer v0.15 #

Vault password:
Enter a (cleartext) path of a file inside the vault: "D:\vault\folder1\folder2\folder3\theFileIcareAbout.exe"
G:\Meine Ablage\Encrypted Storage\Container\d\L6\64LURX5RDMNBGEXI5C2ZGQ475QGQPD\L5F53SYCMZOZWDG4ZELCRAMGBEUXLMWFC44CJDQHHBOGOKX5UPTDVRQYNOBCQAWL6JGS4O2F3L55LGLVUZLLD7MS2TWKEK7U3IWM3MXYQ7ZYUEUG6VRPLG7JQ2MGMMSPPJT75LPHVZ47ARVXOKWEIGIMMVSRNWHZ6DBCRWH2SA25PO4K3QSL6RSRTUIVEF4RJLVCAGVUVRZ3ROA7TCZ26LGBH6H4VWOANAPUYEPEOLTCUTTYJFQXKMTB2CCWZ3HBVBNJWBAUIPNYX7LKD4JN7TLZMEHF3IR6KEE3FS7UI4Z2ZI7TIHFL54OU2ZHUSJU3BNUDCJ5HEBXQ====

The correct path would be: "G:\Meine Ablage\Encrypted Storage\Container\d\EY\PG4T3KFULXLBJ72STWMAXSCXBJKX75\7COF7G2SYYMDU2X2JIQMTV2BRCU3MQYR.lng"

(I can tell by opening the file and see which file syncs in google filestream and also by the filesize)

I would appreciate your help!

qx54 commented 4 years ago

Seems to work for me, but I had to use forward slashes for cleartextPath:

C:\Users\jdoe>java -jar sanitizer-0.16.jar encryptPath -vault c:\Users\jdoe\OneDrive\Vault -cleartextPath folder/file.txt

PS: It was tricky to get a working JRE for Windows because the latest version 8 doesn't work with sanitizer and JRE 9 isn't available and supported anymore. Oracle apparently updated their license etc, TL;DR I ended up installing a community build from https://github.com/ojdkbuild/ojdkbuild