A secure file management system with encryption, 2FA, and malware scanning capabilities.
- 🔒 AES-256 encryption for all files
- 🔐 Two-Factor Authentication (2FA)
- 🛡️ Malware scanning
- 📁 File sharing capabilities
- 📊 Detailed file information with serial numbering
- 🔑 Secure session management
- 📝 Comprehensive logging
- Python 3.8 or higher
- Windows 10/11 (for setup.bat)
- Clone the repository:
git clone https://github.com/Nikhil0905/Secure-File-Management-System
cd secure-file-management-system- Run the setup script:
setup.batThis will:
- Create a virtual environment
- Install required packages
- Set up the storage directory
- Configure environment variables
- Register a new user:
python main.py register <username>- Login (2FA required):
python main.py login <username>- Check login status:
python main.py status- Upload a file:
python main.py upload "path\to\your\file"- List files (with serial numbering):
python main.py listOutput example:
┌──────┬──────────────────┬──────────┬────────┬──────────────┬────────┬──────────┐
│ S.No │ Name │ Size │ Type │ Uploaded │ Owner │ Shared │
├──────┼──────────────────┼──────────┼────────┼──────────────┼────────┼──────────┤
│ 1 │ file1.pdf │ 1.2 MB │ PDF │ 2024-03-20 │ Admin │ No │
│ 2 │ file2.docx │ 2.5 MB │ DOCX │ 2024-03-21 │ Admin │ John │
└──────┴──────────────────┴──────────┴────────┴──────────────┴────────┴──────────┘
- Download a file:
python main.py download "filename" "path\to\save\location"- Share a file:
python main.py share "filename" "other_username"- Delete a file:
python main.py delete "filename"- Logout:
python main.py logout-
Two-Factor Authentication (2FA)
- Required for all users
- Uses authenticator apps (e.g., Google Authenticator)
- Backup codes provided for account recovery
- QR code displayed in terminal for easy setup
-
File Encryption
- AES-256 encryption for all stored files
- Secure key management
- Automatic encryption/decryption
-
Malware Protection
- Basic malware scanning
- File size limits
- Suspicious pattern detection
-
Session Security
- JWT-based authentication
- 24-hour session expiration
- Secure session storage
- Manual logout required
The system can be configured through the .env file:
# Storage Configuration
STORAGE_DIR=secure_storage
MAX_FILE_SIZE=104857600
# Security Configuration
JWT_SECRET_KEY=your-super-secret-key-here
# Logging Configuration
LOG_LEVEL=INFO
# File Type Configuration
ALLOWED_FILE_TYPES=*secure-file-management-system/
├── .env # Configuration file
├── .gitignore # Git ignore rules
├── main.py # Main application entry point
├── secure_file_manager.py # Core functionality
├── requirements.txt # Python dependencies
├── setup.bat # Windows setup script
├── README.md # Documentation
└── secure_storage/ # Encrypted file storage
├── users.json # User data
├── files.json # File metadata
└── system.log # System logs
- Always keep your 2FA backup codes secure
- Regularly change your password
- Don't share your JWT secret key
- Monitor the system logs for suspicious activity
- Use the logout command when finished
The system includes comprehensive error handling:
- Invalid credentials
- File size limits
- Malware detection
- Session expiration
- Network issues
- File sharing permissions
System logs are stored in secure_storage/system.log and include:
- User authentication attempts
- File operations
- Security events
- System errors
- Session management
For issues or questions, please:
- Check the system logs
- Verify your configuration
- Ensure all dependencies are installed
- Contact system administrator