Skip to main content

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

cryptography library

Installation

Via PyPI (Recommended)

You can easily install the library from the Python Package Index (PyPI):

pip install fz-decrypt

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 and tags

xml_pubkey = "..." # Base64 String xml_pass_blob = "..." # Base64 String

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.

Parameters:

master_password (str): The master password entered when starting FileZilla.

xml_pubkey (str): The content of the tag from the XML file (Base64 encoded).

xml_pass (str): The content of the 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fz_decrypt-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fz_decrypt-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file fz_decrypt-0.1.0.tar.gz.

File metadata

  • Download URL: fz_decrypt-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for fz_decrypt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ef3dc44a36a4d53e4b688754cd52eccd4482f06bc3de4902a41ac256f2ae37f
MD5 40784abe4ee0031183993d8b172ee108
BLAKE2b-256 cd30320e072b2dbdbf1d3ca34056a5bc83d4129af0d8152d914369d8529761ef

See more details on using hashes here.

File details

Details for the file fz_decrypt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fz_decrypt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for fz_decrypt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9b832f916d1f7fcbc6162702837e9772de54ebd3f998db253e7b8fc22b1a8b5
MD5 b165c71876940f450cdb058b4e66706f
BLAKE2b-256 4738cdf8c32f87e678b8cc2dffa36dbbea9f714d3bccb95d1f13f777aca96503

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page