This might be a dumb question, but how can I get the plain text password out of the config.
The docs say it's only lightly obfuscated but I can't figure out how.
I thought I knew what I set it to but I was mistaken. I'm trying to avoid reuploading and encrypting 10tb of data again.
You can do it, see this function:
// MustObscure obscures a value, exiting with a fatal error if it failed
func MustObscure(x string) string {
out, err := Obscure(x)
if err != nil {
log.Fatalf("Obscure failed: %v", err)
}
return out
}
// Reveal an obscured value
func Reveal(x string) (string, error) {
ciphertext, err := base64.RawURLEncoding.DecodeString(x)
if err != nil {
return "", errors.Wrap(err, "base64 decode failed when revealing password - is it obscured?")
}
if len(ciphertext) < aes.BlockSize {
return "", errors.New("input too short when revealing password - is it obscured?")
}
buf := ciphertext[aes.BlockSize:]
iv := ciphertext[:aes.BlockSize]
if err := crypt(buf, buf, iv); err != nil {
3 Likes
asdffdsa
(jojothehumanmonkey)
March 7, 2020, 5:31pm
3
what password are you looking for?
the password that encrypts the config file?
or
the password that encrypts the remote?
if you want the password to the encrypted remote, i think you can do this?
rclone config dump > dump.txt
The one that encrypts the remote.
Dumping it gives you the obfuscated version.
I'm trying to setup a Freenas Cloud Sync Task, which uses Rclone, due to my Resilio sync issue. However, FreeNas doesn't appear to load a static config for it's tasks, it creates one each time in a temp directory so I can't just copy my current config.
Not the end of the world if I have to re-encrypt the remote, just a pain.
That did the trick, thanks!
system
(system)
Closed
March 10, 2020, 5:53pm
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.