Home

Awesome

quackalias-cli - DuckDuckGo Email Alias Generator and History Tracker

This project includes scripts to generate DuckDuckGo email aliases and store the history of generated aliases.

Configuration

Obtain the DuckDuckGo API Key

  1. Install the DuckDuckGo web browser extension.
  2. Set up the Email Protection feature.

From here, follow these steps closely:

Note: You can delete the DuckDuckGo web browser extension after obtaining the API key.

For Bash

Installation

  1. Download the script: Save the script as ddg.sh in a directory of your choice.

  2. Set Your DuckDuckGo API Key: Open ddg.sh in a text editor and replace the placeholder API key with your actual key:

    API_KEY = "YOUR_API_KEY_HERE"
    
  3. Make the script executable:

    chmod +x ddg.sh
    
  4. Move the script to a directory in your $PATH:

    mv ddg.sh /usr/local/bin/ddg
    

Usage

Generate an Email Alias

To generate a new DuckDuckGo email alias:

ddg generate

View Alias History

To view the history of generated aliases:

ddg history

Interactive Menu

To use the interactive menu:

ddg

The script will present the following options:

  1. Generate email alias
  2. Show aliases history

History File

The history of generated aliases is stored in ~/.local/share/ddg/aliases_history.txt. Each entry includes the timestamp and the generated email alias.

For PowerShell

Installation

  1. Download the script: Save the script as ddg.ps1 in a directory of your choice.

  2. Install Required Modules:

# Allow script execution
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

# Ensure PowerShell can use REST methods
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
  1. Set Execution Policy: Ensure that the PowerShell script execution policy allows running scripts:

    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
    
  2. Set Your DuckDuckGo API Key: Open ddg.ps1 in a text editor and replace the placeholder API key with your actual key:

    $apiKey = "YOUR_API_KEY_HERE"
    

Usage

Generate an Email Alias

To generate a new DuckDuckGo email alias:

.\ddg.ps1 -action generate

View Alias History

To view the history of generated aliases:

.\ddg.ps1 -action history

Interactive Menu

To use the interactive menu:

.\ddg.ps1

The script will present the following options:

  1. Generate email alias
  2. Show aliases history

History File

The history of generated aliases is stored in C:\Users\YourUsername\.config\ddg\aliases_history.txt. Each entry includes the timestamp and the generated email alias.

License

This project is licensed under the GPL-3.0 License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please fork this repository and create a pull request with your changes. For major changes, please open an issue first to discuss what you would like to change.