A tool to embed python code into a runnable DuckyScript on mac os
Project description
🦆 Quackdoor
Honk Honk!
Quackdoor is a CLI tool written in Python that generates DuckyScript to execute arbitrary Python code on a target machine. It is best used for crafting payloads for Flipper Zero's BadUSB app.
🔧 Features
- Embeds Python scripts into an executable DuckyScript
- Supports external Python libraries (via
-rand-pflags) - Tailored for use with macOS and Zsh environments
- Ideal for authorized security testing and educational purposes
⚠️ Limitations & Considerations
- The target system must have Python 3 installed
- All local Python code must reside in a single file; other local modules will not be compiled into the payload
- External libraries are supported and will be installed globally on the target via pip
- Payload may leave recoverable traces on the target system—use with caution
- Assumes the Zsh shell and standard macOS filesystem on the target
🚀 Getting Started
Clone the repository:
git clone https://github.com/your-org/quackdoor.git
Generate a payload:
cd quackdoor
python3 quackdoor.py -i your_script.py -o output_file_name.txt
Optional flags for additional customization:
-r dependency1 dependency2– Provide a space delimited list of dependencies to install-p– Pip-time, or how long for the resulting DuckyScript to wait after running pip install (if there are dependencies provided)
✅ Development Best Practices
We follow the GitHub Flow for all development work:
-
Create a new branch from
main:git checkout -b feature/my-feature
-
Make your changes and commit them:
git commit -m "#123 Brief description of the change"
- Always reference the GitHub issue number with a
#, e.g.#42 - Write clear and descriptive commit messages
- Always reference the GitHub issue number with a
-
Push your branch:
git push origin feature/my-feature
-
Open a Pull Request targeting the
mainbranch -
Request review and ensure all checks pass
-
Once approved, squash and merge
📦 Release Process
- Bump the version in pyproject.toml
- Edit the version field to the new release number:
version = "0.1.1"
Commit the change:
git add pyproject.toml
git commit -m "Bump version to 0.1.1"
- Tag the release Tag should match the version in pyproject.toml exactly, prefixed with v:
git tag v0.1.1
git push origin v0.1.1
Create the GitHub Release
-
Go to the GitHub "Releases" page
-
Click "Draft a new release"
-
Select the tag you just pushed
-
Fill in release notes. Include a changelog with a compare url like:
https://github.com/mah5057/quackdoor/compare/v0.1.0...v0.1.1
- Click "Publish release"
Publishing to PyPI
The CI workflow will automatically build and publish the new version to PyPI once the GitHub release is published.
📄 License
MIT License. See LICENSE for details.
🛡️ Disclaimer
This software is provided for educational and authorized testing purposes only.
The author is not responsible for misuse, damage, or legal consequences resulting from the use of this tool.
Use responsibly. Honk responsibly. 🦆
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 quackdoor-0.1.1.tar.gz.
File metadata
- Download URL: quackdoor-0.1.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a662709d8833fa3b7e0d2589d97f00d98f8dc41f4c792172d929d176028a7e07
|
|
| MD5 |
143bde1cbf46bc95de701a126399f958
|
|
| BLAKE2b-256 |
f420f3e748938be860d173a3d27367d43dec4c090ba20b5d763a034ffff2ace5
|
File details
Details for the file quackdoor-0.1.1-py3-none-any.whl.
File metadata
- Download URL: quackdoor-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5c10e41c5a11626608245b0f6310917dd544b8322795322a8043cb1a8a21032
|
|
| MD5 |
f3e83c47a0eb00043f294925a558bbad
|
|
| BLAKE2b-256 |
10157eaaed47bcd05fae9094fce59eb3a845f85f80620536892d8cd42ca098af
|