A secure file encryption and text encoding server with web interface and admin tools. Built with Flask (Python) and Rust client.
- File Encryption/Decryption - XOR cipher with password protection
- Base64 Encoding - Text encoding/decoding via web interface
- Secure File Upload - Path traversal protection and file validation
- Token-based Authentication - Secure admin and download access
- Web Interface - User-friendly web UI for all operations
- Admin Dashboard - Server management and monitoring
- Cross-platform Clients - Python and Rust admin clients
- Comprehensive Logging - Detailed server activity logs
- Python 3.8+
- Rust (for admin client)
- FastAPI
- Clone the repository
git clone https://github.com/serbekun/hash_server.git
cd hash_server- Install Python dependencies
pip install -r requirements.txt- Configure server settings
# Edit url_info.py
_IP = "your_server_ip" # Use "127.0.0.1" for local development
_PORT = 2222- Run the server
python main.pyThe server will start at http://your_server_ip:2222
- Main Page:
http://your_server_ip:2222/ - File Encryption:
http://your_server_ip:2222/hashing_file - Base64 Tools:
http://your_server_ip:2222/hashing_text_base64
- Upload any file through the web interface
- Set encryption password (minimum 4 characters)
- Choose encrypt/decrypt mode
- Download processed file using provided token
python admin_client.pyAvailable commands: admin, clear_uploads, list_uploads, log
cd admin_client
cargo runAvailable commands: admin, clear_uploads, list_uploads, log, set_token
POST /hashing_file/process_file
Content-Type: multipart/form-data
file: [file]
password: [string]
mode: encrypt|decryptPOST /base64
Content-Type: application/json
{
"text": "string",
"mod": "1" // 1=encode, 2=decode
}All admin endpoints require valid token in JSON body:
{"token": "admin_your_token_here"}hash_server/
├── server.py # Main server
│
├── src/ # server logic code
│
├── templates/ # Web interfaces
│ ├── main/
│ ├── hashing_file/
│ └── hashing_text_base64/
├── admin_client/ # Rust admin client
│ └── src/
├── tokens/ # Token storage
├── uploads/ # Temporary file storage
├── log/ # Server logs
└── main.py # entry point to server
For production, use environment variables:
export SERVER_IP="your_ip"
export SERVER_PORT="2222"This project is licensed under the MIT License - see the LICENSE file for details.
Note: This server is designed for secure internal networks. For production use, consider additional security measures like HTTPS, rate limiting, and firewall configuration.