Formatting usernames and email addresses
There are a few scenarios in pentesting where you’ll need to enumerate usernames and email addresses. You may need them for phishing, password spraying, or enumerating valid accounts.
If you want to follow along while you perform this exercise, go to https://hunter.io and register for a free account. This is a website for finding company employee names and email addresses. After logging in to your free account, click the drop-down arrow beside your name in the top-right corner and then click on API in the menu.
Figure 8.1 – Selecting API from the hunter.io menu
On this page, you’ll find example commands for various types of API searches. Under Domain Search, click the Copy button. Enter the following command in your terminal, substituting [redacted]
with your own API key:
$ curl https://api.hunter.io/v2/domain-search\?domain=stripe.com\&api_key=[redacted] > employees.txt
In the...