An open API service indexing awesome lists of open source software.

https://github.com/gigachad80/mailansh

OSINT tool to extract contributor's email from GitHub/ Tea / Lab & Bitbucket repos
https://github.com/gigachad80/mailansh

bitbucket bugbounty contributors email gigachad80 gitea github gitlab mail osint repo repos repository

Last synced: 6 months ago
JSON representation

OSINT tool to extract contributor's email from GitHub/ Tea / Lab & Bitbucket repos

Awesome Lists containing this project

README

          

πŸš€ Project Name : Mailansh
===============

### Mailansh : OSINT tool to extract emails of contributors from Git repositories across multiple platforms with advanced filtering capabilities.


![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-purple.svg)

## Table of Contents

* [πŸ“Œ Overview](#-overview)
* [✨ Features](#-features)
* [πŸ“š Requirements & Dependencies](#-requirements--dependencies)
* [πŸ“₯ Installation Guide](#-installation-guide)
* [πŸš€ Usage](#-usage)
- [Basic Usage](#basic-usage)
* [πŸ“‹ Command Line Options](#-command-line-options)
* [πŸ“Roadmap](#-roadmap)
* [πŸ”§ Technical Details](#-technical-details)
* [πŸ€” Why This Name?](#-why-this-name)
* [⌚ Development Time](#-development-time)
* [πŸ™ƒ Why I Created This](#-why-i-created-this)
* [🀝 Contributing](#-contributing)
* [πŸ“ž Contact](#-contact)
* [πŸ“„ License](#-license)

### πŸ“Œ Overview

**Mailansh** is an OSINT tool to extract emails of contributors from Git repositories across multiple platforms. It provides advanced filtering capabilities and concurrent processing for optimal performance, making it perfect for repository analysis, team insights, and contributor research.

**Key Capabilities:**
* Multi-platform repository support (GitHub, GitLab, Gitea, Bitbucket)
* High-performance concurrent processing with worker pools
* Advanced email filtering and categorization
* Smart deduplication with preference for real names
* Multiple output formats (formatted table, CSV)
* Real-time progress tracking

### ✨ Features

### πŸš€ Multi-Platform Support
- **GitHub**
- **GitLab**
- **Gitea**
- **Bitbucket**

### ⚑ High Performance
- **Concurrent Processing** - 8 worker goroutines for optimal speed
- **Dual Extraction** - Processes both commit logs and patch content simultaneously
- **Progress Tracking** - Real-time progress updates with percentage completion
- **Smart Deduplication** - Prefers real names over noreply usernames
- **Memory Efficient** - Streaming processing with automatic cleanup

### 🎯 Advanced Filtering
- **GitHub NoReply** (`-g`) - Show only GitHub noreply emails
- **Popular Domains** (`-p`) - Filter for Gmail, Outlook, Yahoo, ProtonMail, etc.
- **Custom Domains** (`-cd`) - Show only custom/corporate domains
- **Quiet Mode** (`-q`) - CSV output perfect for scripting and data processing

### πŸ›‘οΈ Smart Email Detection
- Platform-specific noreply patterns recognition
- Comprehensive email validation and sanitization
- Invalid email filtering (test domains, localhost, malformed addresses)
- Thread-safe contributor management with mutex protection

### πŸ“š Requirements & Dependencies

* **Go 1.19+** - Latest version recommended for optimal performance
* **Git** - Must be installed and accessible in system PATH

### πŸ“₯ Installation Guide

### ⚑ Quick Install

**Method 1: Build from Source**
```bash
git clone https://github.com/gigachad80/Mailansh
cd Mailansh/cmd/mailansh/
go build -o mailansh main.go
```
OR

**Method 3: Download Binary**
Download the latest binary from the [releases page](https://github.com/gigachad80/Mailansh/releases) and add it to your PATH.

### πŸš€ Usage

### Basic Usage

```bash
# Extract all contributors
./mailansh https://github.com/user/repo

# G#itHub noreply emails only
./mailansh -g https://github.com/user/repo

# Popular email domains only
./mailansh -p https://github.com/user/repo

# Custom/corporate domains only
./mailansh -cd https://github.com/user/repo -

# Extract Popular email domains only and ave them
./mailansh -p -o popular.csv https://github.com/user/repo

# Save to file
./mailansh -o contributors.csv https://github.com/user/repo

# Help and usage information
./mailansh -h

```

> [!WARNING]
> #### πŸ“ Known Behavior & FAQs
> ### Progress Display Not Reaching 100%
> You might notice the progress indicator stopping at something like "189/221 commits (85.5%)" instead of 100%. This is **normal behavior** and doesn't affect the completeness of results.
> ### Why this happens:
> * The tool uses a **dual extraction strategy** with concurrent workers
> * **Method 1**: `git log` extraction (always completes successfully)
> * **Method 2**: Patch content analysis with 8 concurrent workers
> * Some git commits may fail to process (merge commits, corrupted patches, etc.)
> * Workers may terminate early on errors, but **all emails are still found**
> ### What this means:
> * βœ… **Your results are complete** - all contributor emails are extracted
> * βœ… The primary `git log` method captures all standard contributors
> * βœ… Patch analysis adds any additional emails found in commit content
> * βœ… Failed commits don't contain unique contributor information
> **Note: Even if patch processing shows <100%, the contributor list remains accurate and complete.**
> ### Example output:
```bash
[INFO] Extracting from commit history...
[INFO] Extracting from patch content...
[PROGRESS] 189/221 commits (85.5%)
[INFO] Found 45 unique contributors (after filtering):
```

### πŸ“‹ Command Line Options

| Flag | Description | Example Usage |
|------|-------------|---------------|
| `-h` | Show help menu | `./mailansh -h` |
| `--quiet`, `-q` | CSV output suitable for redirection | `./mailansh repo -q > output.csv` |
| `-g` | Show only GitHub noreply emails | `./mailansh -g repo ` |
| `-p` | Show only popular domain emails | `./mailansh -p repo` |
| `-cd` | Show only custom/corporate domains | `./mailansh =cd repo ` |
| `-o ` | Save output to file (.csv or .txt) | `./mailansh -o results.csv repo` |

### πŸ“ Roadmap

- [ ] Develop Web UI
- [x] Release cross platform executables / binaries

### πŸ”§ Technical Details

### Architecture
- **Concurrent Design** - Parallel extraction from commit log and patches
- **Worker Pool Pattern** - 8 goroutines process commits simultaneously
- **Thread-Safe Operations** - Mutex-protected contributor management
- **Memory Efficient** - Streaming processing with temporary cleanup
- **Context-Aware** - Proper cancellation and timeout handling

### Performance Characteristics
- **Large Repositories** - Efficiently handles 10,000+ commits
- **Memory Usage** - ~50MB average for most repositories
- **Processing Speed** - ~100-500 commits/second depending on system specs
- **Concurrency** - 8 worker goroutines + 2 extraction goroutines

### πŸ€” Why This Name?

Can't disclose due to personal reasons β•°(*Β°β–½Β°*)β•―

### ⌚ Development Time

From initial concept to feature-complete implementation, including testing, optimization, and documentation, the development took approximately **4 hours**.

### πŸ™ƒ Why I Created This

Actually, I wanted to develop something else but this got developed by mistakeπŸ’€ and because of this mess, that project was left incomplete

### 🀝 Contributing

Contributions are welcome! Here's how you can help:

1. **Fork the repository**
2. **Create a feature branch** (`git checkout -b feature/amazing-feature`)
3. **Commit your changes** (`git commit -m 'Add amazing feature'`)
4. **Push to the branch** (`git push origin feature/amazing-feature`)
5. **Open a Pull Request**

### Development Guidelines
- Follow Go best practices and conventions
- Add tests for new features
- Update documentation for any changes
- Ensure backward compatibility

### πŸ“ž Contact

πŸ“§ Email: **pookielinuxuser@tutamail.com**

---

### πŸ“„ License

Licensed under the **RPL 1.5** and a **Custom License**.
Check here: [`CREDITS.md`](https://github.com/gigachad80/Mailansh/blob/main/CREDITS.md) (Important)
Also see: [`LICENSE.md`](https://github.com/gigachad80/Mailansh/blob/main/LICENCE.md)

First Published : 5th September 2025

Last Updated : 13th September 2025

---

**Made with ❀️ in Go** - Fast, concurrent, and reliable contributor analysis.