Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

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:

  1. Clone the repository or download the source.

  2. Navigate to the directory containing pyproject.toml.

  3. 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 <Pass> tags and their PubKey Attribute
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 Attribute of the <Pass> 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.

About

A library to decrypt FileZilla-Client passwords protected by a master password.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /