yadayada / acd_cli

An unmaintained command line interface and FUSE filesystem for Amazon (Cloud) Drive
Other
1.35k stars 165 forks source link

Is there a way to encode all files as pictures? #548

Open 0xFEEDC0DE64 opened 7 years ago

0xFEEDC0DE64 commented 7 years ago

Amazon offers free unlimited storage for pictures (I tried file extensions jpeg, png and bmp).

Is there a way to implement a plugin the encodes all files before upload into pictures and does the opposite on download?

I implemented such a mechanism using c++ for use on local filesystem but I cant get it work using mounting acd_cli.

Not all pictures get written correctly (timeout and other errors) and so I cannot restore the original files from the pictures.

bgemmill commented 7 years ago

As a heads up, Amazon looks into files' contents. They process thumbnails for pictures and PDFs, provide previews for text files, and so on. If you're stuffing payload blobs into exif space, appending to the end of dummy jpgs, etc, they're probably going to notice.

The current (2017-04-14) rate of $60/year is one of the best out there for unlimited space; my advice is to buy it and use it normally :-)

0xFEEDC0DE64 commented 7 years ago

I know they are looking into the files. That's why I am encoding all the information into pixels. It is a 100% valid picture. If they compress it (into a lossy format like jpeg), i am screwed.

I am asking if this is possible using a plugin. I never wrote (or read) anything in python, but coming from c++ this shoud be possible, right?

bgemmill commented 7 years ago

I see, if you wanted the files as images, you may want to create your own Fuse filesystem and layer that on top of acdcli, in much the same way as the encrypting file systems mentioned in #374.

You'd have what's called an upper mount, where files appeared normally, and a lower mount, where the same files appeared as images. If the image lower mount were the same as acdcli's upper mount, your images would get stored on amazon.

A benefit of this approach is you can code it up in c++ if you're more familiar there.

If you wanted to do this in python, have a look at the loopback example to get fuse going: https://github.com/terencehonles/fusepy/blob/master/examples/loopback.py And the PIL for image manipulation: https://python-pillow.org/