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

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

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.4.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.4-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clipboardjacker-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 e06228f943cfea2a38b4f10c233a2383bc613456d4651a47d881ba3e47701407
MD5 f51b0cd7acc47b300f125a0e33ad735a
BLAKE2b-256 5ed8f1b0c875b1e21a6512f644ca74dcbaeb61798a2ab3dc183e9677a505d2e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for clipboardjacker-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 18058400fcb8e74edcf65fb95e77bc08aa557d77f4fbd3e0d02b243e91f08270
MD5 ad2ba0c35fcd086042b85c2c3130ae4f
BLAKE2b-256 b8b23a1eb46d357d9c3f27d2dfeaed2c78a3434ed34632e356deded0419a0e1c

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