🚀 MailGrab v2 Is Here — Packed With More Firepower: Concurrent Crawling, An MCP Server For AI Agents (Claude, Copilot, Cursor, Codex), robots.txt-Aware Crawling, Email De-Obfuscation, MX Validation, Resume/Append Modes, And A Lot More. See The Release Notes For The Full Rundown.
-
Python 3.9+ (keep Scrawling To See Installation Tutorial)
-
Windows/Linux/Mac
-
Pip3
-
Internet Connection (Obviously😜)
Clone The Repo From Official Page Of OCEAN OF ANYTHING OFFICIAL And Change Directory To MailGrab
git clone https://github.com/oceanofanything/MailGrab
cd MailGrab
Just Run The install.bat File And Wait For The Installation To Complete.
install.bator
python -u install.pyIts Just Simple As That 😎. Just Run The Following Command And Wait For The Installation To Complete🙂.
sudo python -u install.pyProTip! It's Necessary To Run Tis In Root Or Sudo
Go And Visit The Official Page Of Python. Then Install Python On Your System. Make Sure To Install Python Version 3.9.0. To Prevent Any Mistake Please Use Link Bellow
You Can Also Install From This Link
Install Python 3.9 In Linux.
sudo apt install software-properties-common
Open Terminal And Enter The Following Command
sudo add-apt-repository ppa:deadsnakes/ppasudo apt update
sudo apt install python3.9
python --versionBy-default python3-pip is not installed in Ubuntu 20.04 and installing it from apt will install old pip package. So let's see step by step installation of latest python3-pip version (20.3.3). It will be a two-step process, first, we will install pip 20.0.2 using the apt repository. Then, download and install the latest pip package i.e. 20.3.3 version.
sudo apt install python3-pip
Here pip version 20.0.2 got installed and we need to upgrade it to version 20.3.3. Installing package 3.8 from apt will help to meet all dependent packages and libraries which will be required for pip 20.3.3. If you will skip this step, you may get dependent modules error.
If curl is already installed your system, you can skip this step. Most of the Ubuntu 20.04 don't have curl installed by default. So use apt install command to install it. Curl is required to execute step 4.
sudo apt install curlNow you need to download get pip from bootstrap.pypa.io website using curl command as shown in image.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.pyRun python3.9 command to execute "get-pip.py" package file you downloaded. It will automatically download and install the latest pip in your Ubuntu/Kali Linux.
sudo python3.9 get-pip.pyThis can be achieved by editing /etc/environment file using your favourite editor. Otherwise, exporting and appending "PATH" variable for the local user profile will also do the trick. Make sure you add ~/.local/bin/ in PATH variable.
export PATH=~/.local/bin/:$PATH
pip3.9 --versionCongrats!! till this point you have installed latest Python 3.9.0 and pip 20.3.3 successfully.
pip install -r requirements.txtIf You Are On Windows Machine, You Can Just Run windows.bat FileTo Start The Program Directly.
You Can Also Do It Manually-
Just Open Powershell Or Command Prompt And Then Type Following Command
python -m MailGrab.py
For Linux Users, You Just Have To Type The Same Thing To Terminal.
Just Open Terminal And Type The Following Command
python -m MailGrab.py
MailGrab Is An Easy To Use, User Friendly, Cross Platform And Reliable Tool
Just Run It And Answer The Prompts:
python MailGrab.pyAfter Launching MailGrab Just Input Url And It Will Automatically Do It's
Work. It Will List All Emails And SubUrls In Terminal, Crawling Concurrently, Respecting robots.txt By Default.
You Can Provide A Huge List Of Urls In A File Named _inputUrls.txt
. It Will Automatically Detect The File In Current Directory And Will Harvest From The Emails One By One!
This Is A Sicret Please Dont Tell It To Anyone!
Every Prompt Has A Matching CLI Flag, So MailGrab Can Run Headless In A Script Or CI Job With No Input At All:
python MailGrab.py --url https://example.com --depth 20Some Of The Most Used Flags:
| Flag | What It Does |
|---|---|
--url / --depth |
Skip The Interactive Prompts |
--input <file> |
Use A Custom Seed-Url File Instead Of _inputUrls.txt |
--concurrency <n> |
How Many Pages To Fetch At Once |
--same-domain |
Don't Wander Off The Seed Url's Own Domain |
--use-sitemap |
Also Seed The Crawl From sitemap.xml |
--verify-mx |
Drop Emails Whose Domain Has No Mail Server |
--append / --resume |
Keep Building On A Previous Run Instead Of Starting Over |
--quiet |
Print One JSON Summary Line Instead Of The Banner/Console Output |
Run python MailGrab.py --help To See Every Flag.
MailGrab Saves Its Findings In The Current Directory Every Run:
_emails.txt/_scrappedUrls.txt— Plain Text Lists (The Classic Format)_emails.csv— Spreadsheet-Friendly, One Row Per Email With The Url It Was Found On_results.json— Everything In One Structured File (Emails, Urls, Sources, Social/Contact Links) — Also What--append/--resumeRead Back_MailGrabLog.txt— A Debug Log Of The Run
MailGrab Has Grown A Lot Of Knobs — Concurrency Tuning, Rate Limiting, robots.txt/Crawl-delay Handling, De-Obfuscation, Proxy Support, And More. Every Feature, Every Flag, Every Environment Variable, And What's Actually Happening Behind The Scenes Is Documented In The GitHub Wiki.
MailGrab Also Ships An MCP (Model Context Protocol) Server (mailgrab_mcp_server.py), So AI Coding Agents Like Claude, GitHub Copilot, Cursor, Or Codex Can Call MailGrab As A Tool Instead Of You Shelling Out To It By Hand. Each Call Runs MailGrab.py As Its Own Subprocess In A Private Temp Directory, So Concurrent Tool Calls Never Corrupt The Agent's Stdio Stream Or Clobber Each Other's Output Files.
python mailgrab_mcp_server.pySee The GitHub Wiki's "MCP Server" Page For How To Point Your Agent Of Choice At It.

