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
From here, follow these steps closely:
-
From DuckDuckGo’s email autofill page, right-click anywhere on the page and select “Inspect” from the context menu.
-
In the developer tools panel, click the “Network” tab at the top.
-
On the DuckDuckGo site next to the sidebar, click the “Generate Private Duck Address” button.
-
In the developer panel sidebar, click on the word “addresses.”
-
Scroll down until you see the words “authorization: Bearer,” followed by a long string of letters and numbers.
-
Copy the long string of letters and numbers (without the “authorization: Bearer” portion) to your clipboard.
Note: You can delete the DuckDuckGo web browser extension after obtaining the API key.
For Bash
Installation
-
Download the script: Save the script as
ddg.sh
in a directory of your choice. -
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"
-
Make the script executable:
chmod +x ddg.sh
-
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:
- Generate email alias
- 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
-
Download the script: Save the script as
ddg.ps1
in a directory of your choice. -
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
-
Set Execution Policy: Ensure that the PowerShell script execution policy allows running scripts:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
-
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:
- Generate email alias
- 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.