Skip to content

ishaq2321/hide-and-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hide&Lock: Secure File & Directory Encryption Tool πŸ”’

A powerful command-line tool for securely encrypting and managing sensitive files and directories with session support and advanced file utilities.

⚠️ Important Disclaimer

We are not responsible for any data loss. While Hide&Lock is designed to be secure and reliable:

  • Always keep backups of important files before locking them
  • Store your master keys in a safe place
  • Be careful with sensitive directories
  • Data loss might occur due to:
    • Forgetting passwords or master keys
    • System crashes during encryption/decryption
    • Improper use of force options (-r)
    • Accidental deletion of configuration

Features ✨

  • πŸ” Strong AES256 encryption
  • πŸ“ Session-based file management
  • πŸ”‘ Master key recovery system
  • ⚑ Temporary and permanent unlocking options
  • πŸ›‘οΈ Sensitive directory protection
  • 🎯 Simple and intuitive interface
  • πŸ”„ Multiple session support with separate passwords
  • βš™οΈ Session management tools
  • πŸ“… NEW: Timestamp manipulation - Modify file/folder creation and modification dates
  • πŸ• NEW: Batch timestamp operations - Update multiple files at once
  • πŸ“‹ NEW: Timestamp copying - Copy timestamps between files
  • 🎨 NEW: Folder color customization - Change folder colors across desktop environments
  • 🌈 NEW: Color presets and custom colors - 15 preset colors plus custom hex colors
  • πŸ”„ NEW: Batch color operations - Apply colors to multiple folders at once

Installation πŸš€

# Clone the repository
git clone https://github.com/ishaq2321/hide-and-lock.git

# Navigate to the directory
cd hide-and-lock

# Make the script executable
chmod +x lock.sh

Quick Start 🎯

# Basic usage
./lock.sh                    # Start normally
./lock.sh -s Photos          # Start with session 'Photos'
./lock.sh -h                 # Show help menu

Usage Examples πŸ’‘

Basic Operations

# Lock a directory
./lock.sh
> Choose option 1
> Enter path: /path/to/folder

# Unlock a directory
./lock.sh
> Choose option 2
> Select ID and unlock type

# Timestamp manipulation
./lock.sh
> Choose option 4
> Various timestamp operations available

Timestamp Manipulation Examples

# View current timestamps
./lock.sh
> Option 4 -> Option 1
> Enter file path

# Set specific timestamps
./lock.sh
> Option 4 -> Option 2
> Enter timestamps in various formats:
  - "2023-12-25 15:30:00"
  - "2023-12-25"
  - "2 days ago"
  - "last week"

# Copy timestamps from another file
./lock.sh
> Option 4 -> Option 3
> Specify source and target files

# Batch operations
./lock.sh
> Option 4 -> Option 4
> Update multiple files with same timestamp

Folder Color Customization Examples

# Set folder color from presets
./lock.sh
> Option 5 -> Option 1
> Select from 15 preset colors (Red, Blue, Green, etc.)

# Set custom hex color
./lock.sh
> Option 5 -> Option 2
> Enter custom color name and hex code (#FF5733)

# Reset folder to default color
./lock.sh
> Option 5 -> Option 3
> Remove custom coloring

# Batch color operations
./lock.sh
> Option 5 -> Option 4
> Apply same color to multiple folders

Advanced Usage πŸ’‘

Session Management

# Create/access a session
./lock.sh -s Photos         # Work with Photos session
./lock.sh -s Documents      # Work with Documents session

# Delete a session
./lock.sh --delete-session  # Interactive session deletion

# Each session has:
- Independent password
- Unique master key
- Separate locked items
- Isolated configuration

Security Options

# Force lock sensitive directories
./lock.sh -r -k <key> /path/to/sensitive

# Recover using master key
./lock.sh -m <master-key>

# Delete configuration
./lock.sh --delete-config

# Show version info
./lock.sh -v

Command Line Options πŸ“

Options:
  -h, --help         Show help message
  -m KEY            Recover using master key
  -r                Force lock sensitive directories
  -k KEY            Provide current key for operations
  -s SESSION        Specify session name (e.g., Photos, Documents)
  -v, --version     Show program version and author information
  --delete-session  Delete a specific session (interactive)
  --delete-config   Delete configuration (requires password)

Timestamp Manipulation Features πŸ“…

Supported Date Formats

  • ISO Format: 2023-12-25 15:30:00
  • Date Only: 2023-12-25
  • Relative: 2 days ago, last week, yesterday
  • Natural: Dec 25 2023, Christmas 2023

Operations Available

  1. View Timestamps - Display current access, modify, and change times
  2. Set Specific Times - Manually set access and modification times
  3. Copy Timestamps - Copy timestamps from one file to another
  4. Batch Operations - Update multiple files/directories at once
  5. Reset to Current - Update timestamps to current time

Use Cases

  • Privacy: Remove traces of when files were accessed/modified
  • Organization: Set consistent timestamps for related files
  • Forensics: Analyze or modify file timeline information
  • Backup Restoration: Maintain original timestamps after restoration

Folder Color Customization Features 🎨

Supported Desktop Environments

  • GNOME/Ubuntu - Uses gio metadata and emblems
  • KDE/Plasma - Creates .directory files with custom icons
  • XFCE - Uses Thunar-compatible directory files
  • MATE/Cinnamon - Generic method with desktop entries
  • Generic - Fallback method for unknown environments

Available Colors

Preset Colors (15 options):

  1. Red (#FF0000)
  2. Green (#00FF00)
  3. Blue (#0000FF)
  4. Yellow (#FFFF00)
  5. Orange (#FFA500)
  6. Purple (#800080)
  7. Pink (#FFC0CB)
  8. Brown (#A52A2A)
  9. Gray (#808080)
  10. Black (#000000)
  11. Cyan (#00FFFF)
  12. Magenta (#FF00FF)
  13. Lime (#32CD32)
  14. Navy (#000080)
  15. Maroon (#800000)

Custom Colors:

  • Any valid hex color (#RRGGBB format)
  • Custom color names
  • Color preview in terminal

Operations Available

  1. Set Preset Colors - Choose from 15 predefined colors
  2. Set Custom Colors - Use any hex color with custom names
  3. Reset to Default - Remove custom coloring
  4. Batch Operations - Apply colors to multiple folders
  5. View Current Color - Check existing color configuration

Use Cases

  • Organization - Color-code folders by project, priority, or type
  • Visual Management - Quick identification of important directories
  • Personal Preference - Customize your file manager appearance
  • Team Collaboration - Standardize folder colors across team projects

Tips & Best Practices πŸ’ͺ

  1. Session Management:

    • Create separate sessions for different types of data
    • Use meaningful session names
    • Keep track of master keys for each session
    • Regularly backup session configurations
  2. Data Safety:

    • Never delete configuration directories manually
    • Always use --delete-session for removing sessions
    • Keep master keys in a secure, separate location
    • Test unlocking before deleting original files
  3. Sensitive Directories:

    • Check sensitive_dirs.txt for protected locations
    • Use -r flag carefully with sensitive directories
    • Create sessions away from system directories
  4. Timestamp Operations:

    • Always verify timestamps after modification
    • Be careful with batch operations on system files
    • Keep backups before major timestamp changes
    • Use relative dates for convenience ("2 days ago")
  5. Folder Color Operations:

    • Test colors in a non-important directory first
    • Some file managers may require restart to show changes
    • Colors are stored in .directory and .folder_color files
    • Batch operations can be undone by batch reset

Contributing 🀝

Contributions are welcome! Please feel free to submit pull requests.

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a pull request

Coming for Windows in the next version.

Looking for More Advanced Security? πŸ”

Hide&Lock provides simple and secure file encryption, but if you need extremely sophisticated security with advanced features like keyboard logging protection and enhanced folder locking mechanisms, check out our advanced solution:

PhantomVault - An extremely sophisticated security tool that uses keyboard logging techniques to secure and lock folders with advanced protection mechanisms.

Contact πŸ“ž

For support, feature requests, or issues:

License πŸ“„

This project is licensed under the MIT See the LICENSE file for details.


Note: This tool is for legitimate use only. Always respect privacy and data protection laws.

About

A secure command-line utility for encrypting and managing sensitive files/folders with session-based isolation and master key recovery.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages