Skip to content

Vfs (Very Fast and Secure) file system is a virtual file system and saves your file in compressed and encrypted format.

Notifications You must be signed in to change notification settings

blood-rogue/vfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VFS (Very Fast and Secure)

Vfs is a virtual file system (it's also vfs) that exposes a linux like console and supports most of the common commands. It stores the files in encrypted and compressed format.

Features

  • Linux like commands.
  • Encrypted with aes-256-gcm with key provided by user.
  • Compressed using snappy compression algorithm.
  • SHA-2 checksums to check file integrity.

File format (*.vfs)

Offset Hex Description
0 76 66 73 00 The magic bytes vfs\0
4 00 00 00 00 00 00 00 00 The length of the meta-data
12 00 00 00 00 00 00 00 00 The offset of the meta-data

Note: The hex bytes for offsets 4 and 12 are an example and are not fixed. They depend on the contents stored in the file system.

Supported Commands

  • ls

    • usage: ls
    • description: List all the entries in the current working directory.
  • rm

    • usage: rm <file path>
    • description: Remove a file with the path specified.
  • cd

    • usage: cd <folder path>
    • description: Change the current working directory to the path specified.
  • cp

    • usage: cp <from path> <to path>
    • description: Copy a file from one location to another.
  • mv

    • usage: mv <from path> <to path>
    • description: Moves a file from one path to another. Can also be used to rename
  • pwd

    • usage: pwd
    • description: Prints the current working directory.
  • cat

    • usage: cat <file path>
    • description: Prints the contents of a file to the console.
  • help

    • usage: help
    • description: Prints this message to the console.
  • exit

    • usage: exit
    • description: Writes metadata, closes the file and exits the application
  • nano

    • usage: nano <file path>
    • description: Edits the contents of the file with the given path.
  • reset

    • usage: reset
    • description: Resets the metadata, zeroes all data and exits.
  • touch

    • usage: touch <file path>
    • description: Creates a file and opens write mode to type your contents. End the stream by typeing << EOF.
  • mkdir

    • usage: mkdir <dir_path>
    • description: Create a dir at the given path with the last item being the dir name
  • rmdir

    • usage: rmdir <dir_path>
    • description: Removes a directory recursively.
  • import

    • usage: import <from path> <to path>
    • description: Imports a file from the device and adds it to the Vfs.
  • export

    • usage: export <from path> <to path>
    • description: Exports a decrypted file from Vfs to the device.
  • check

    • usage: check
    • description: Checks the integrity of the stored files.
  • defrag

    • usage: defrag
    • description: Defragments the Vfs and removes the free areas in between.
    • note: Currently this feature is not yet implemented.

About

Vfs (Very Fast and Secure) file system is a virtual file system and saves your file in compressed and encrypted format.

Topics

Resources

Stars

Watchers

Forks