This project includes scripts to generate DuckDuckGo email aliases and store the history of generated aliases.
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.
-
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
To generate a new DuckDuckGo email alias:
ddg generate
To view the history of generated aliases:
ddg history
To use the interactive menu:
ddg
The script will present the following options:
- Generate email alias
- Show aliases history
The history of generated aliases is stored in ~/.local/share/ddg/aliases_history.txt
. Each entry includes the timestamp and the generated email alias.
-
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"
To generate a new DuckDuckGo email alias:
.\ddg.ps1 -action generate
To view the history of generated aliases:
.\ddg.ps1 -action history
To use the interactive menu:
.\ddg.ps1
The script will present the following options:
- Generate email alias
- Show aliases history
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.
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.
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.