-
-
Save lokkju/533b9c0a0783287d9168 to your computer and use it in GitHub Desktop.
#!/usr/bin/python | |
# This program will copy, rename and decode Vaulty .vdata files back to images and videos for viewing in normal applications. | |
# Usage: python vaulty-decode.py <directory with .vdata files> | |
import sys | |
import os | |
import glob | |
import io | |
def usage(): | |
print "Usage: %s <path to directory with vdata files>" % sys.argv[0] | |
print "" | |
sys.exit() | |
def main(args): | |
if len(args) != 2 or not os.path.isdir(args[1]): | |
print "Error: Invalid Argument, please provide a valid directory name" | |
usage() | |
vdata_dir = args[1] | |
vdata_files = glob.glob(os.path.join(vdata_dir,'*.vdata')) | |
print "Found %s .vdata encoded files" % len(vdata_files) | |
for vdata_file in vdata_files: | |
with io.open(vdata_file,'rb') as vfdf: | |
bn = os.path.basename(vdata_file) | |
if vfdf.read(8) == 'obscured': | |
nfn = 'decrypted_' + bn + '.jpg' | |
with io.open(os.path.join(vdata_dir,nfn),'wb') as idf: | |
idf.write(vfdf.read()) | |
print "processed %s" % nfn | |
else: | |
nfn = 'decrypted_' + bn + '.3gp' | |
vfdf.seek(0) | |
with io.open(os.path.join(vdata_dir,nfn),'wb') as idf: | |
idf.write(vfdf.read()) | |
print "processed %s" % nfn | |
print "Done!" | |
if __name__ == '__main__': | |
main(sys.argv) |
I also need help with understanding the process of running this code or simply converting the data files.
Recently attempted to use this tool to recover my vaulty files.
Advice for future users:
As stated in the above comment there are syntax errors that have to be fixed for it to run
It appears to only support .jpg and .3gp
If the file was originally a .png etc it will automatically export the file as a .3gp
All of my files were png so none of them were properly "decoded" and I haven't tested the seemingly supported formats.
I found a way easier method if you are having issues and don't want to customize this script:
Open up the .vdata file in your hex editor of choice (I use HxD)
On the first line will be "obscured" followed by "%PNG" or "%JPG" depending on the file type.
All you have to do now is delete the word "obscured" which will put "%PNG" to the beginning of the file.
Save and then just rename the extension of the file to whatever was after the %
Profit. Hope this helps out.
If anybody need this, here's a 3.7.1 compatible update to this script. Only tested on JPGs.
#!/usr/bin/python
# This program will copy, rename and decode Vaulty .vdata files back to images and videos for viewing in normal applications.
# Usage: python vaulty-decode.py <directory with .vdata files>
import sys
import os
import glob
import io
def usage():
print("Usage: {} <path to directory with vdata files>".format(sys.argv[0]))
print("")
sys.exit()
def main(args):
if len(args) != 2 or not os.path.isdir(args[1]):
print("Error: Invalid Argument, please provide a valid directory name")
usage()
vdata_dir = args[1]
vdata_files = glob.glob(os.path.join(vdata_dir,'*.vdata'))
print("Found {} .vdata encoded files".format(len(vdata_files)))
for vdata_file in vdata_files:
with io.open(vdata_file,'rb') as vfdf:
bn = os.path.basename(vdata_file)
if vfdf.read(8) == b'obscured':
nfn = 'decrypted_' + bn + '.jpg'
with io.open(os.path.join(vdata_dir,nfn),'wb') as idf:
idf.write(vfdf.read())
print("processed {}".format(nfn))
else:
nfn = 'decrypted_' + bn + '.3gp'
vfdf.seek(0)
with io.open(os.path.join(vdata_dir,nfn),'wb') as idf:
idf.write(vfdf.read())
print("processed {}".format(nfn))
print("Done!")
if __name__ == '__main__':
main(sys.argv)
Recently attempted to use this tool to recover my vaulty files.
Advice for future users:
As stated in the above comment there are syntax errors that have to be fixed for it to run It appears to only support .jpg and .3gp If the file was originally a .png etc it will automatically export the file as a .3gp All of my files were png so none of them were properly "decoded" and I haven't tested the seemingly supported formats.
I found a way easier method if you are having issues and don't want to customize this script:
Open up the .vdata file in your hex editor of choice (I use HxD) On the first line will be "obscured" followed by "%PNG" or "%JPG" depending on the file type. All you have to do now is delete the word "obscured" which will put "%PNG" to the beginning of the file. Save and then just rename the extension of the file to whatever was after the %
Profit. Hope this helps out.
This definitely helped. Thanks for the info! FYI for others who had videos: it shows differently than a photo. It shows something like "ftypmp42", which means mp4.
Hi, What are the syntax errors? I keep getting the please provide valid directory error
In case anyone still needs this, I made a script that utilizes Vaulty's local database for metadata, so it'll support all file types. The only downside is that it requires root to access said database, but since the app has cloud backups, you can just use an AVD with root access.
https://gist.github.com/ggtylerr/9dd93e9d999e685771b970698acd895e
Recently attempted to use this tool to recover my vaulty files.
Advice for future users:
As stated in the above comment there are syntax errors that have to be fixed for it to run It appears to only support .jpg and .3gp If the file was originally a .png etc it will automatically export the file as a .3gp All of my files were png so none of them were properly "decoded" and I haven't tested the seemingly supported formats.
I found a way easier method if you are having issues and don't want to customize this script:
Open up the .vdata file in your hex editor of choice (I use HxD) On the first line will be "obscured" followed by "%PNG" or "%JPG" depending on the file type. All you have to do now is delete the word "obscured" which will put "%PNG" to the beginning of the file. Save and then just rename the extension of the file to whatever was after the %
Profit. Hope this helps out.
This seemed like a good idea, and I was able to get one 3gp file. However most of the files have obscuredÿØÿà..JF (and then IF in the beginning of the 2nd line presenting JFIF?) so whatever those are, seem to be files containing non-ASCII characters or binary data that doesn't correspond to readable text.
hi please help me i have a lot of vdata files in my drive,how can i convert them what should i do ?