A library to decrypt FileZilla-Client passwords protected by a master password.
Project description
FileZilla Decryptor Lib (fz-decrypt)
A lightweight, robust Python library for decrypting FileZilla Server passwords protected by a master password (sitemanager.xml).
This library implements FileZilla's cryptography logic (PBKDF2, X25519 Key Exchange, AES-GCM) in pure Python.
📋 Prerequisites
- Python 3.7 or higher
cryptographylibrary
🚀 Installation
Via PyPI (Recommended)
You can easily install the library from the Python Package Index (PyPI):
pip install fz-decrypt
(Note: Replace fz-decrypt with your actual package name if different)
From Source (Development)
If you want to modify the code or install a local version:
-
Clone the repository or download the source.
-
Navigate to the directory containing
pyproject.toml. -
Run:
pip install .
For development (changes are reflected immediately):
pip install -e .
💻 Usage
The library provides a main class FileZillaDecryptor. It requires no instantiation; the decrypt method is a static/class method.
Simple Example
from fz_decrypt import FileZillaDecryptor, DecryptionError, InvalidDataError
# 1. Data from FileZilla sitemanager.xml
# These strings can be found in the <PubKey> and <Pass> tags
xml_pubkey = "..." # Base64 String from <PubKey>
xml_pass_blob = "..." # Base64 String from <Pass>
# 2. The user's master password
master_password = "MySecretMasterPassword"
try:
# Attempt decryption
cleartext_password = FileZillaDecryptor.decrypt(
master_password,
xml_pubkey,
xml_pass_blob
)
print(f"The decrypted password is: {cleartext_password}")
except DecryptionError:
print("Error: The master password is incorrect or the data is corrupt.")
except InvalidDataError as e:
print(f"Error: Invalid data format (Base64 error, etc.): {e}")
except Exception as e:
print(f"An unexpected error occurred: {e}")
📖 API Reference
FileZillaDecryptor.decrypt(master_password, xml_pubkey, xml_pass)
Decrypts a password using the FileZilla algorithm.
Parameters:
master_password(str): The master password entered when starting FileZilla.xml_pubkey(str): The content of the<PubKey>tag from the XML file (Base64 encoded).xml_pass(str): The content of the<Pass>tag from the XML file (Base64 encoded).
Returns:
str: The decrypted password in cleartext.
Exceptions:
DecryptionError: Raised if the master password is incorrect (AES-GCM Tag Mismatch).InvalidDataError: Raised if the Base64 strings are invalid or the blobs have an incorrect length.
🔒 Security Note
This tool is intended for recovering your own passwords. Please handle decrypted credentials responsibly. Never store passwords unencrypted in text files if it can be avoided.
📄 License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fz_decrypt-0.1.1.tar.gz.
File metadata
- Download URL: fz_decrypt-0.1.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da431bb2b9c5d71508b2e79b47ad98986dbdd3f8317c42c04538b653433cb686
|
|
| MD5 |
0719acb5c7c9c135643c2cb60796b8cc
|
|
| BLAKE2b-256 |
7054f6425929cad7808ba36b28dec1cf4094d83bc5a592cd98af7722fe3e08b0
|
File details
Details for the file fz_decrypt-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fz_decrypt-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fbe9e1da39fea1d4fdf6a2b409c5e81f77c13426340f646d80cbf64f72d01fd
|
|
| MD5 |
03de83c2942946b812a4adfdc0e2ef4e
|
|
| BLAKE2b-256 |
49e01ff1474acb8adceb08d8c7fd3f64cbf6568022264260090cbc7ffc0717d0
|